summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-04-19 17:24:43 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-04-19 17:24:43 (GMT)
commit0e1e79f0e02606364018806d465d48eed8ffd153 (patch)
treec7bffe852a3f284a397638536558b2a198a8bfdb /fortran
parent14d8e1c2b5ecaf2e298984f269094dd5f2bd735f (diff)
downloadhdf5-0e1e79f0e02606364018806d465d48eed8ffd153.zip
hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.gz
hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.bz2
[svn-r23601] Bring revisions #23341 - 23597 from trunk to revise_chunks.
h5committtested.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Off.f9014
-rw-r--r--fortran/src/Makefile.in2
-rw-r--r--fortran/src/h5fc.in46
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/tH5O.f902
-rw-r--r--fortran/test/tH5T_F03.f9013
-rw-r--r--fortran/test/tf.f9011
7 files changed, 53 insertions, 36 deletions
diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90
index 1437e9f..8a40079 100644
--- a/fortran/src/H5Off.f90
+++ b/fortran/src/H5Off.f90
@@ -191,7 +191,7 @@ CONTAINS
SUBROUTINE h5oclose_f(object_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: object_id
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER , INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION h5oclose_c(object_id)
@@ -565,7 +565,7 @@ CONTAINS
! obj_id - Object identifier.
!
! Outputs:
-! hdferr - Returns 0 if successful and -1 if fails.
+! hdferr - Returns 0 if successful and -1 if fails.
!
! AUTHOR
! M. Scot Breitenfeld
@@ -717,16 +717,16 @@ CONTAINS
! 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,
+! 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.
+! comment - The new comment.
!
! Outputs:
-! hdferr - Returns 0 if successful and -1 if fails.
+! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
-! lapl_id - Link access property list identifier.
+! lapl_id - Link access property list identifier.
!
! AUTHOR
! M. Scot Breitenfeld
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index c41653f..7379980 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 2d7b5b4..d052046 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -80,12 +80,11 @@ FLINKERBASE="@FC@"
# FFLAGS and LDFLAGS are reserved for use by the script user.
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
-# User's FFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS come just before clibpath, user's LIBS come after
-# $link_objs and before the hdf5 libraries in $link_args, followed by any
-# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
-# or LIBS carried in from the hdf5 build.
-
+# User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just
+# before clibpath, user's LIBS come after $link_objs and before the hdf5
+# libraries in $link_args, followed by any external library paths and libraries
+# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# The order of the flags is intended to give precedence to the user's flags.
H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
F9XMODFLAG="@F9XMODFLAG@"
F9XSUFFIXFLAG="@F9XSUFFIXFLAG@"
@@ -98,7 +97,16 @@ FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}"
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
LIBS="${HDF5_LIBS:-$LIBSBASE}"
-USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+# If a static library is available, the default will be to use it. If the only
+# available library is shared, it will be used by default. The user can
+# override either default, although choosing an unavailable library will result
+# in link errors.
+STATIC_AVAILABLE="@enable_static@"
+if test "${STATIC_AVAILABLE}" = "yes"; then
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+else
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}"
+fi
usage() {
# A wonderfully informative "usage" message.
@@ -110,8 +118,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -233,8 +242,13 @@ for arg in $@ ; do
*) allargs="$allargs $arg"
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
- if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \
- "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then
+ if [ "$ext" = ".f" -o "$ext" = ".F" -o \
+ "$ext" = ".for" -o "$ext" = ".FOR" -o \
+ "$ext" = ".ftn" -o "$ext" = ".FTN" -o \
+ "$ext" = ".f90" -o "$ext" = ".F90" -o \
+ "$ext" = ".f95" -o "$ext" = ".F95" -o \
+ "$ext" = ".f03" -o "$ext" = ".F03" -o \
+ "$ext" = ".f08" -o "$ext" = ".F08" ] ; then
do_compile="yes"
compile_args="$compile_args $arg"
fname=`basename $arg $ext`
@@ -344,11 +358,11 @@ if test "x$do_link" = "xyes"; then
# module. It's okay if they're included twice in the compile line.
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
- # User's FFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS come just before clibpath, user's LIBS come after
- # $link_objs and before the hdf5 libraries in $link_args, followed by any
- # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
- # or LIBS carried in from the hdf5 build.
+ # User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just
+ # before clibpath, user's LIBS come after $link_objs and before the hdf5
+ # libraries in $link_args, followed by any external library paths and libraries
+ # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+ # The order of the flags is intended to give precedence to the user's flags.
$SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 4ce185b..62030f0 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -6,6 +6,7 @@ H5LIB_mp_H5GET_LIBVERSION_F
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
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90
index b68e7ca..ea91631 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.f90
@@ -535,7 +535,7 @@ SUBROUTINE test_h5o_link(total_error)
! close the datatype
CALL h5tclose_f(tid, error)
- CALL check("h5tclose_f",error)
+ CALL check("h5tclose_f",error, total_error)
CALL h5ocopy_f(file_id, NAME_DATATYPE_SIMPLE, file_id, NAME_DATATYPE_SIMPLE2, error)
CALL check("h5ocopy_f",error,total_error)
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index f7efcc4..a9a6487 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -3137,10 +3137,15 @@ SUBROUTINE t_enum_conv(total_error)
! Enumerated data array
! Some values are out of range for testing. The library should accept them
- INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data1 = (/E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,&
- E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED,&
- E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE,&
- E1_RED, E1_WHITE, INT(0,KIND(E1_RED)), INT(-1,KIND(E1_RED)), INT(-2,KIND(E1_RED))/)
+ 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
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index d5c32c8..4f73fda 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -30,7 +30,7 @@
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify_real
+!DEC$attributes dllexport :: verify_real_kind_7
!DEC$endif
SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error)
USE HDF5
@@ -115,7 +115,7 @@ END SUBROUTINE verify
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify
+!DEC$attributes dllexport :: verify_Fortran_INTEGER_4
!DEC$endif
SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
USE HDF5
@@ -129,9 +129,6 @@ SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
RETURN
END SUBROUTINE verify_Fortran_INTEGER_4
-
-
-
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyLogical
@@ -151,7 +148,7 @@ END SUBROUTINE verifyLogical
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyString
!DEC$endif
-SUBROUTINE verifystring(string, value,correct_value,total_error)
+SUBROUTINE verifyString(string, value,correct_value,total_error)
CHARACTER*(*) :: string
CHARACTER*(*) :: value, correct_value
INTEGER :: total_error
@@ -160,7 +157,7 @@ SUBROUTINE verifystring(string, value,correct_value,total_error)
WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
ENDIF
RETURN
-END SUBROUTINE verifystring
+END SUBROUTINE verifyString
!----------------------------------------------------------------------