summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2011-10-13 20:25:32 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2011-10-13 20:25:32 (GMT)
commit711f8f7934acd04ec13407f9911359a19ff90aee (patch)
treebc29601c0da75c0bad517119dbad97e4c67649ec /fortran
parentffb0f23af213f9f914372a856c6766a9fe87e33f (diff)
downloadhdf5-711f8f7934acd04ec13407f9911359a19ff90aee.zip
hdf5-711f8f7934acd04ec13407f9911359a19ff90aee.tar.gz
hdf5-711f8f7934acd04ec13407f9911359a19ff90aee.tar.bz2
[svn-r21552] Maintenance: Addressed HDFFV-915 - investigate if H5open and H5close are needed in the corresponding
Fortran wrappers. Solutions: The calls were not needed and were removed from the C stubs h5open_c and h5close_c for the correspnding Fortran subroutines h5open_f and h5close_f. Platforms tested: jam with gcc and gfortran, PGI and Intel koala with PGI and Intel linew with the standard Sun compilers
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5_ff.f9040
1 files changed, 12 insertions, 28 deletions
diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90
index 99a82bd..96d9eed 100644
--- a/fortran/src/H5_ff.f90
+++ b/fortran/src/H5_ff.f90
@@ -49,7 +49,7 @@ CONTAINS
! h5open_f
!
! PURPOSE
-! Initializes the HDF5 library and Fortran90 interface.
+! Initializes HDF5 Fortran interface.
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
@@ -63,26 +63,17 @@ CONTAINS
! 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_0, error_1, error_2, error_3
+ INTEGER :: error_1, error_2, error_3
-! INTEGER, EXTERNAL :: h5init_types_c
-! INTEGER, EXTERNAL :: h5init_flags_c
-! INTEGER, EXTERNAL :: h5init1_flags_c
-! INTEGER, EXTERNAL :: h5open_c
-
- INTERFACE
- INTEGER FUNCTION h5open_c()
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OPEN_C'::h5open_c
- !DEC$ENDIF
- END FUNCTION h5open_c
- END INTERFACE
INTERFACE
INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types)
USE H5GLOBAL
@@ -144,7 +135,6 @@ CONTAINS
!DEC$ENDIF
END FUNCTION h5init1_flags_c
END INTERFACE
- error_0 = h5open_c()
error_1 = h5init_types_c(predef_types, floating_types, integer_types)
error_2 = h5init_flags_c(H5D_flags, &
H5E_flags, &
@@ -164,7 +154,7 @@ CONTAINS
H5Z_flags, &
H5generic_flags)
error_3 = h5init1_flags_c(H5LIB_flags )
- error = error_0 + error_1 + error_2 + error_3
+ error = error_1 + error_2 + error_3
END SUBROUTINE h5open_f
!****s* H5LIB/h5close_f
@@ -173,7 +163,7 @@ CONTAINS
! h5close_f
!
! PURPOSE
-! Closes the HDF5 library and Fortran90 interface.
+! Closes HDF5 Fortran interface.
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
@@ -187,21 +177,16 @@ CONTAINS
! 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, error_2
- ! INTEGER, EXTERNAL :: h5close_types_c, h5close_c
- INTERFACE
- INTEGER FUNCTION h5close_c()
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_C'::h5close_c
- !DEC$ENDIF
- END FUNCTION h5close_c
- END INTERFACE
+ INTEGER :: error_1
INTERFACE
INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, &
f_types, F_TYPES_LEN, &
@@ -221,8 +206,7 @@ CONTAINS
error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, &
floating_types, FLOATING_TYPES_LEN, &
integer_types, INTEGER_TYPES_LEN )
- error_2 = h5close_c()
- error = error_1 + error_2
+ error = error_1
END SUBROUTINE h5close_f