summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/run-fortran-ex.sh.in2
-rw-r--r--fortran/src/H5Aff.F903
-rw-r--r--fortran/src/H5Dff.F909
-rw-r--r--fortran/src/H5Ff.c46
-rw-r--r--fortran/src/H5Fff.F90100
-rw-r--r--fortran/src/H5Pff.F908
-rw-r--r--fortran/src/H5Rff.F906
-rw-r--r--fortran/src/H5Tff.F902
-rw-r--r--fortran/src/H5_buildiface.F90194
-rw-r--r--fortran/src/H5config_f.inc.cmake36
-rw-r--r--fortran/src/H5f90proto.h1
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/tH5F.F9021
13 files changed, 303 insertions, 126 deletions
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index cace1ae..da0c357 100644
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -32,7 +32,7 @@ EXIT_FAILURE=1
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-@prefix@}"
+prefix="${prefix:-../../..}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index 827b803..a728f2d 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -76,6 +76,9 @@ MODULE H5A
USE H5GLOBAL
+ PRIVATE h5awrite_char_scalar, h5awrite_ptr
+ PRIVATE h5aread_char_scalar, h5aread_ptr
+
INTERFACE h5awrite_f
MODULE PROCEDURE h5awrite_char_scalar
! This is the preferred way to call h5awrite
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index 3915f72..77f0a15 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -90,6 +90,15 @@ MODULE H5D
USE, INTRINSIC :: ISO_C_BINDING
USE H5GLOBAL
+ PRIVATE h5dread_vl_integer, h5dread_vl_real, h5dread_vl_string
+ PRIVATE h5dwrite_vl_integer, h5dwrite_vl_real, h5dwrite_vl_string
+ PRIVATE h5dwrite_reference_obj, h5dwrite_reference_dsetreg, h5dwrite_char_scalar, h5dwrite_ptr
+ PRIVATE h5dread_reference_obj, h5dread_reference_dsetreg, h5dread_char_scalar, h5dread_ptr
+ PRIVATE h5dfill_integer, h5dfill_c_float, h5dfill_c_double, h5dfill_char
+#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0
+ PRIVATE h5dfill_c_long_double
+#endif
+
INTERFACE h5dextend_f
MODULE PROCEDURE h5dset_extent_f
END INTERFACE
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 2d5f6ed..a4e786e 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -402,52 +402,6 @@ h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
return ret_value;
}
-/****if* H5Ff/h5fis_hdf5_c
- * NAME
- * h5fis_hdf5_c
- * PURPOSE
- * Call H5Fis_hdf5 to determone if the file is an HDF5 file
- * INPUTS
- * 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.
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * Elena Pourmal
- * Tuesday, August 3, 1999
- * HISTORY
- *
- * SOURCE
-*/
-int_f
-h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag)
-/******/
-{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- htri_t status;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Fopen function.
- */
- status = H5Fis_hdf5(c_name);
- *flag = (int_f)status;
- if (status >= 0) ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
-}
/****if* H5Ff/h5fclose_c
* NAME
* h5fclose_c
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index 358e421..9c8b941 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -45,6 +45,18 @@ MODULE H5F
! Number of objects opened in H5open_f
INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ
+ INTERFACE
+ INTEGER(C_INT) FUNCTION h5fis_accessible(name, &
+ access_prp_default) BIND(C,NAME='H5Fis_accessible')
+ IMPORT :: C_CHAR
+ IMPORT :: HID_T
+ IMPORT :: C_INT
+ IMPLICIT NONE
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
+ INTEGER(HID_T), INTENT(IN), VALUE :: access_prp_default
+ END FUNCTION h5fis_accessible
+ END INTERFACE
+
CONTAINS
!****s* H5F/h5fcreate_f
!
@@ -486,6 +498,63 @@ CONTAINS
END SUBROUTINE h5fget_access_plist_f
+!****s* H5F/h5fis_accessible_f
+!
+! NAME
+! h5fis_accessible_f
+!
+! PURPOSE
+! Determines whether a file can be accessed as HDF5.
+!
+! 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
+! OPTIONAL PARAMETERS
+! access_prp - file access property list identifier
+! AUTHOR
+! Dana Robinson
+! September 2018
+!
+! HISTORY
+! Explicit Fortran interfaces were added for
+! called C functions (it is needed for Windows
+! port). February 28, 2001
+!
+! SOURCE
+ SUBROUTINE h5fis_accessible_f(name, status, hdferr, access_prp)
+ 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(HID_T), OPTIONAL, INTENT(IN) :: access_prp
+ ! File access property list
+ ! identifier
+!*****
+ INTEGER(HID_T) :: access_prp_default
+ CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
+ INTEGER(C_INT) :: flag ! "TRUE/FALSE/ERROR" flag from C routine
+
+ access_prp_default = H5P_DEFAULT_F
+ IF (PRESENT(access_prp)) access_prp_default = access_prp
+
+ c_name = TRIM(name)//C_NULL_CHAR
+
+ flag = H5Fis_accessible(c_name, access_prp_default)
+
+ hdferr = 0
+ IF(flag.LT.0) hdferr = -1
+
+ status = .TRUE.
+ IF (flag .EQ. 0) status = .FALSE.
+
+ END SUBROUTINE h5fis_accessible_f
+
+! XXX (VOL_MERGE): This function should probably be marked as
+! deprecated since H5Fis_hdf5() is deprecated.
+
!****s* H5F/h5fis_hdf5_f
!
! NAME
@@ -503,6 +572,12 @@ CONTAINS
! Elena Pourmal
! August 12, 1999
!
+! NOTES
+! The underlying HDF5 C API call (H5Fis_hdf5) has been deprecated
+! in favor of the VOL-capable H5Fis_accessible(). New code should
+! use h5fis_accessible_f() instead of this function in case this
+! function is deprecated in the future.
+!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
@@ -516,26 +591,23 @@ CONTAINS
! 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.
+ INTEGER(HID_T) :: access_prp_default
+ CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
+ INTEGER(C_INT) :: flag ! "TRUE/FALSE/ERROR" 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
+ c_name = TRIM(name)//C_NULL_CHAR
+
+ flag = H5Fis_accessible(c_name, H5P_DEFAULT_F)
+
+ hdferr = 0
+ IF(flag.LT.0) hdferr = -1
- 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
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index afb9136..455c72e 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -42,6 +42,14 @@ MODULE H5P
USE H5GLOBAL
USE H5fortkit
+ PRIVATE h5pset_fapl_multi_l, h5pset_fapl_multi_s
+ PRIVATE h5pset_fill_value_integer, h5pset_fill_value_char, h5pset_fill_value_ptr
+ PRIVATE h5pget_fill_value_integer, h5pget_fill_value_char, h5pget_fill_value_ptr
+ PRIVATE h5pset_integer, h5pset_char, h5pset_ptr
+ PRIVATE h5pget_integer, h5pget_char, h5pget_ptr
+ PRIVATE h5pregister_integer, h5pregister_ptr
+ PRIVATE h5pinsert_integer, h5pinsert_char, h5pinsert_ptr
+
INTERFACE h5pset_fapl_multi_f
MODULE PROCEDURE h5pset_fapl_multi_l
MODULE PROCEDURE h5pset_fapl_multi_s
diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90
index f5a9c6e..6c2ba28 100644
--- a/fortran/src/H5Rff.F90
+++ b/fortran/src/H5Rff.F90
@@ -56,6 +56,12 @@ MODULE H5R
! END TYPE
!
+ PRIVATE h5rget_object_type_obj_f
+ PRIVATE h5rget_region_region_f, h5rget_region_ptr_f
+ PRIVATE h5rcreate_object_f, h5rcreate_region_f, h5rcreate_ptr_f
+ PRIVATE h5rdereference_object_f, h5rdereference_region_f, h5rdereference_ptr_f
+ PRIVATE h5rget_name_object_f, h5rget_name_region_f, h5rget_name_ptr_f
+
INTERFACE h5rget_object_type_f
MODULE PROCEDURE h5rget_object_type_obj_f
diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90
index b63c61d..46c8f39 100644
--- a/fortran/src/H5Tff.F90
+++ b/fortran/src/H5Tff.F90
@@ -41,6 +41,8 @@ MODULE H5T
USE H5GLOBAL
IMPLICIT NONE
+ PRIVATE h5tenum_insert_f03, h5tenum_insert_f90
+
!****t* H5T/hvl_t
! Fortran2003 Derived Type:
TYPE hvl_t
diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90
index d4ebdd3..f793b7f 100644
--- a/fortran/src/H5_buildiface.F90
+++ b/fortran/src/H5_buildiface.F90
@@ -135,162 +135,268 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') "MODULE H5_GEN"
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
- WRITE(11,'(A)') ' USE H5GLOBAL'
+ WRITE(11,'(2X,A)') 'USE, INTRINSIC :: ISO_C_BINDING'
+ WRITE(11,'(2X,A)') 'USE H5GLOBAL'
+
+ WRITE(11,'(2X,A)') 'USE H5A'
+ WRITE(11,'(2X,A)') 'USE H5D'
+ WRITE(11,'(2X,A)') 'USE H5P'
+ WRITE(11,'(2X,A)') 'IMPLICIT NONE'
+
+!******************************
+! DECLARE PRIVATE INTERFACES
+!******************************
+
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(2X,A)') "PRIVATE 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,'(2X,A)') "PRIVATE h5awrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
+ DO k = 2, 8
+ WRITE(11,'(2X,A)') "PRIVATE h5awrite_ckind_rank"//chr_rank(k)
+ ENDDO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(2X,A)') "PRIVATE 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,'(2X,A)') "PRIVATE h5aread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
+ DO k = 2, 8
+ WRITE(11,'(2X,A)') "PRIVATE h5aread_ckind_rank"//chr_rank(k)
+ ENDDO
+
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(2X,A)') "PRIVATE 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,'(2X,A)') "PRIVATE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
+ DO k = 2, 8
+ WRITE(11,'(2X,A)') "PRIVATE h5dwrite_ckind_rank"//chr_rank(k)
+ END DO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ DO k = 1, 8
+ WRITE(11,'(2X,A)') "PRIVATE 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,'(2X,A)') "PRIVATE h5dread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
+ ENDDO
+ END DO
+ DO k = 2, 8
+ WRITE(11,'(2X,A)') "PRIVATE h5dread_ckind_rank"//chr_rank(k)
+ ENDDO
+
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ WRITE(11,'(2X,A)') "PRIVATE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2))
+ END DO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ WRITE(11,'(2X,A)') "PRIVATE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2))
+ END DO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ WRITE(11,'(2X,A)') "PRIVATE h5pset_kind_"//TRIM(ADJUSTL(chr2))
+ END DO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ WRITE(11,'(2X,A)') "PRIVATE h5pget_kind_"//TRIM(ADJUSTL(chr2))
+ END DO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ WRITE(11,'(2X,A)') "PRIVATE h5pregister_kind_"//TRIM(ADJUSTL(chr2))
+ END DO
+ DO i = 1, num_rkinds
+ j = rkind(i)
+ WRITE(chr2,'(I2)') j
+ WRITE(11,'(2X,A)') "PRIVATE h5pinsert_kind_"//TRIM(ADJUSTL(chr2))
+ END DO
- 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"
+ WRITE(11,'(2X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5awrite_ckind_rank"//chr_rank(k)
ENDDO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Aread_f
- WRITE(11,'(A)') " INTERFACE h5aread_f"
+ WRITE(11,'(2X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5aread_ckind_rank"//chr_rank(k)
ENDDO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
!***************
! H5D INTERFACES
!***************
!
! H5Dwrite_f
- WRITE(11,'(A)') " INTERFACE h5dwrite_f"
+ WRITE(11,'(2X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5dwrite_ckind_rank"//chr_rank(k)
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Dread_f
- WRITE(11,'(A)') " INTERFACE h5dread_f"
+ WRITE(11,'(2X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,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)
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5dread_ckind_rank"//chr_rank(k)
ENDDO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
!***************
! H5P INTERFACES
!***************
!
! H5Pset_fill_value_f
- WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f"
+ WRITE(11,'(2X,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))
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2))
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Pget_fill_value_f
- WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f"
+ WRITE(11,'(2X,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))
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2))
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Pset_f
- WRITE(11,'(A)') " INTERFACE h5pset_f"
+ WRITE(11,'(2X,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))
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2))
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Pget_f
- WRITE(11,'(A)') " INTERFACE h5pget_f"
+ WRITE(11,'(2X,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))
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2))
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Pregister_f
- WRITE(11,'(A)') " INTERFACE h5pregister_f"
+ WRITE(11,'(2X,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))
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2))
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
! H5Pinsert_f
- WRITE(11,'(A)') " INTERFACE h5pinsert_f"
+ WRITE(11,'(2X,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))
+ WRITE(11,'(5X,A)') "MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2))
END DO
- WRITE(11,'(A)') " END INTERFACE"
+ WRITE(11,'(2X,A)') "END INTERFACE"
WRITE(11,'(A)') 'CONTAINS'
diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake
index b8d5355..3dd3c8c 100644
--- a/fortran/src/H5config_f.inc.cmake
+++ b/fortran/src/H5config_f.inc.cmake
@@ -12,16 +12,19 @@
! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure
! Define if we have parallel support
-#cmakedefine H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@
+#cmakedefine01 H5_HAVE_PARALLEL
+#if H5_HAVE_PARALLEL == 0
+#undef H5_HAVE_PARALLEL
+#endif
! Define if the intrinsic function STORAGE_SIZE exists
-#cmakedefine H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@
+#define H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@
! Define if the intrinsic function SIZEOF exists
-#cmakedefine H5_FORTRAN_HAVE_SIZEOF @H5_FORTRAN_HAVE_SIZEOF@
+#define H5_FORTRAN_HAVE_SIZEOF @H5_FORTRAN_HAVE_SIZEOF@
! Define if the intrinsic function C_SIZEOF exists
-#cmakedefine H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@
+#define H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@
! Define if the intrinsic C_LONG_DOUBLE exists
#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@
@@ -30,41 +33,40 @@
#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
! Define if the intrinsic module ISO_FORTRAN_ENV exists
-#cmakedefine H5_HAVE_ISO_FORTRAN_ENV @H5_HAVE_ISO_FORTRAN_ENV@
-
+#define H5_HAVE_ISO_FORTRAN_ENV @H5_HAVE_ISO_FORTRAN_ENV@
! should this be ${HDF_PREFIX} instead of H5 MSB
-#cmakedefine H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@
+#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@
! should this be ${HDF_PREFIX} instead of H5 MSB
-#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
! Define the maximum decimal precision for reals
-#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
+#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
! If C has quad precision
-#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
+#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
! Define if INTEGER*16 is available
#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@
! Maximum decimal precision for C
-#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
+#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
! number of valid REAL KINDs
-#cmakedefine H5_H5CONFIG_F_NUM_RKIND @H5_H5CONFIG_F_NUM_RKIND@
+#define H5_H5CONFIG_F_NUM_RKIND @H5_H5CONFIG_F_NUM_RKIND@
! valid REAL KINDs (need to have a matching C counter-part)
-#cmakedefine H5_H5CONFIG_F_RKIND @H5_H5CONFIG_F_RKIND@
+#define H5_H5CONFIG_F_RKIND @H5_H5CONFIG_F_RKIND@
! valid REAL KINDs (need to have a matching C counter-part)
-#cmakedefine H5_H5CONFIG_F_RKIND_SIZEOF @H5_H5CONFIG_F_RKIND_SIZEOF@
+#define H5_H5CONFIG_F_RKIND_SIZEOF @H5_H5CONFIG_F_RKIND_SIZEOF@
! number of valid INTEGER KINDs
-#cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@
+#define H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@
! valid INTEGER KINDs (need to have a matching C counter-part)
-#cmakedefine H5_H5CONFIG_F_IKIND @H5_H5CONFIG_F_IKIND@
+#define H5_H5CONFIG_F_IKIND @H5_H5CONFIG_F_IKIND@
! Fortran compiler id
-#cmakedefine H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@
+#define H5_Fortran_COMPILER_ID @CMAKE_Fortran_COMPILER_ID@
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 46ef8ef..0884eb6 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -78,7 +78,6 @@ typedef struct H5O_info_t_f {
*/
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);
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 3a5a91f..2edba5a 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -94,6 +94,7 @@ H5F_mp_H5FOPEN_F
H5F_mp_H5FREOPEN_F
H5F_mp_H5FGET_CREATE_PLIST_F
H5F_mp_H5FGET_ACCESS_PLIST_F
+H5F_mp_H5FIS_ACCESSIBLE_F
H5F_mp_H5FIS_HDF5_F
H5F_mp_H5FGET_NAME_F
H5F_mp_H5FGET_FILESIZE_F
diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90
index 72920f2..d51803b 100644
--- a/fortran/test/tH5F.F90
+++ b/fortran/test/tH5F.F90
@@ -30,8 +30,6 @@
! access the dataset from the second file as a member of a group
! in the first file.
-
-
MODULE TH5F
CONTAINS
@@ -234,7 +232,24 @@ CONTAINS
CALL check("h5fclose_f",error,total_error)
!
- !test whether files are in hdf5 format
+ !test whether files are accessible as HDF5 (new, VOL-safe, way)
+ !
+ CALL h5fis_accessible_f(fix_filename1, status, error)
+ CALL check("h5fis_accessible_f",error,total_error)
+ IF ( .NOT. status ) THEN
+ write(*,*) "File ", fix_filename1, " is not accessible as hdf5"
+ stop
+ END IF
+
+ CALL h5fis_accessible_f(fix_filename2, status, error)
+ CALL check("h5fis_accessible_f",error,total_error)
+ IF ( .NOT. status ) THEN
+ write(*,*) "File ", fix_filename2, " is not accessible as hdf5"
+ stop
+ END IF
+
+ !
+ !test whether files are in hdf5 format (old way)
!
CALL h5fis_hdf5_f(fix_filename1, status, error)
CALL check("h5fis_hdf5_f",error,total_error)