summaryrefslogtreecommitdiffstats
path: root/hl/fortran/test
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2016-07-07 13:36:50 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2016-07-07 13:36:50 (GMT)
commit3e5a61c9ff7a22589dbb2fc71f95f32f919c8b54 (patch)
tree1621853d0d1ab1bae07396125218ca88ecbb91db /hl/fortran/test
parent88476380be230e68f84cd5ed117af098c4133dd0 (diff)
downloadhdf5-3e5a61c9ff7a22589dbb2fc71f95f32f919c8b54.zip
hdf5-3e5a61c9ff7a22589dbb2fc71f95f32f919c8b54.tar.gz
hdf5-3e5a61c9ff7a22589dbb2fc71f95f32f919c8b54.tar.bz2
[svn-r30154] Fixed inequality comparsions for reals in HL fortran tests
(HDFFV-9949, MSB, 7/7/16)
Diffstat (limited to 'hl/fortran/test')
-rw-r--r--hl/fortran/test/CMakeLists.txt8
-rw-r--r--hl/fortran/test/Makefile.am29
-rw-r--r--hl/fortran/test/tstlite.F9074
-rw-r--r--hl/fortran/test/tsttable.F9052
4 files changed, 112 insertions, 51 deletions
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index fc703dc..13cb177 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -31,7 +31,7 @@ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
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})
+target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
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)
@@ -39,7 +39,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
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_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_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
@@ -73,7 +73,7 @@ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
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})
+target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
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)
@@ -81,7 +81,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
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_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_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
diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am
index 32d367c..4013d39 100644
--- a/hl/fortran/test/Makefile.am
+++ b/hl/fortran/test/Makefile.am
@@ -22,7 +22,7 @@
include $(top_srcdir)/config/commence.am
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/hl/src
-AM_FCFLAGS+=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/hl/fortran/src
+AM_FCFLAGS+=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src -I$(top_builddir)/fortran/test $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/test $(F9XMODFLAG)$(top_builddir)/hl/fortran/src
# Some Fortran compilers can't build shared libraries, so sometimes we
# need to make sure the Fortran programs link against the static version
@@ -36,7 +36,9 @@ endif
TEST_PROG=tstds tstlite tstimage tsttable
check_PROGRAMS=$(TEST_PROG)
-LDADD= $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5)
+LIBOBJS=$(top_builddir)/fortran/test/tf_gen.o
+
+LDADD=$(LIBOBJS) $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5)
# Source files for the programs
tstds_SOURCES=tstds.F90
@@ -47,6 +49,29 @@ tsttable_SOURCES=tsttable.F90
# Temporary files.
CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f[1-2]tab.h5 tstds.h5
+# Fortran module files can have different extensions and different names
+# (e.g., different capitalizations) on different platforms. Write rules
+# for them explicitly rather than trying to teach automake about them.
+# They should be installed as headers and removed during clean.
+maintainer-clean-local: clean-local
+distclean-local: clean-local
+clean-local:
+ @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
+ $(RM) *.$(F9XMODEXT); \
+ fi
+
+install-data-local:
+ @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
+ $(CP) $(top_builddir)/$(subdir)/*.$(F9XMODEXT) $(DESTDIR)$(includedir)/. ; \
+ fi
+
+uninstall-local:
+ @if test -n "$(F9XMODEXT)" -a "X$(F9XMODEXT)" != "Xo"; then \
+ if test -f "$(includedir)/hdf5.$(F9XMODEXT)" -o -f "$(DESTDIR)$(includedir)/HDF5.$(F9XMODEXT)"; then \
+ set -x; $(RM) $(includedir)/*.$(F9XMODEXT); \
+ fi; \
+ fi
+
# Mark this directory as part of the Fortran API (this affects output
# from tests in conclude.am)
FORTRAN_API=yes
diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90
index 42e2bcc..b19ca5a 100644
--- a/hl/fortran/test/tstlite.F90
+++ b/hl/fortran/test/tstlite.F90
@@ -20,6 +20,7 @@
MODULE TSTLITE
+ USE TH5_MISC_GEN
IMPLICIT NONE
CONTAINS
@@ -122,7 +123,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf1(i) .NE. bufr1(i) ) THEN
+ CALL VERIFY("h5ltread_dataset_f",buf1(i), bufr1(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer (I)'
PRINT *, bufr1(i), ' and ', buf1(i)
STOP
@@ -147,7 +149,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf2(i) .NE. bufr2(i) ) THEN
+ CALL VERIFY("h5ltread_dataset_f",buf2(i), bufr2(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer (R)'
PRINT *, bufr2(i), ' and ', buf2(i)
STOP
@@ -179,7 +182,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf3(i) .NE. bufr3(i) ) THEN
+ CALL VERIFY("h5ltread_dataset_f",buf3(i), bufr3(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer (D)'
PRINT *, bufr3(i), ' and ', buf3(i)
STOP
@@ -337,7 +341,8 @@ CONTAINS
!
DO i = 1, dims(1)
DO j = 1, dims(2)
- IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN
+ CALL VERIFY("h5ltread_dataset_f",buf3(i,j), buf3r(i,j), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, buf3r(i,j), ' and ', buf3(i,j)
STOP
@@ -368,7 +373,8 @@ CONTAINS
!
DO i = 1, dims(1)
DO j = 1, dims(2)
- IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN
+ CALL VERIFY("h5ltread_dataset_f", buf4(i,j), buf4r(i,j), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, buf4r(i,j), ' and ', buf4(i,j)
STOP
@@ -551,7 +557,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",buf3(i,j,k), buf3r(i,j,k), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k)
STOP
@@ -582,7 +589,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f", buf4(i,j,k), buf4r(i,j,k), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k)
STOP
@@ -1040,7 +1048,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",rbuf_4(i,j,k,l), rbufr_4(i,j,k,l), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l)
STOP
@@ -1048,7 +1057,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",rbuf_5(i,j,k,l,m), rbufr_5(i,j,k,l,m), errcode)
+ IF (errcode .NE.0 ) 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
@@ -1056,7 +1066,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",rbuf_6(i,j,k,l,m,n), rbufr_6(i,j,k,l,m,n), errcode)
+ IF (errcode .NE.0 ) 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
@@ -1064,7 +1075,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",rbuf_7(i,j,k,l,m,n,o), rbufr_7(i,j,k,l,m,n,o), errcode)
+ IF (errcode .NE.0 ) 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
@@ -1124,7 +1136,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",dbuf_4(i,j,k,l), dbufr_4(i,j,k,l), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l)
STOP
@@ -1132,7 +1145,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",dbuf_5(i,j,k,l,m), dbufr_5(i,j,k,l,m), errcode)
+ IF (errcode .NE.0 ) 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
@@ -1140,7 +1154,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",dbuf_6(i,j,k,l,m,n), dbufr_6(i,j,k,l,m,n), errcode)
+ IF (errcode .NE.0 ) 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
@@ -1148,7 +1163,8 @@ CONTAINS
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
+ CALL VERIFY("h5ltread_dataset_f",dbuf_7(i,j,k,l,m,n,o), dbufr_7(i,j,k,l,m,n,o), errcode)
+ IF (errcode .NE.0 ) 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
@@ -1323,7 +1339,8 @@ CONTAINS
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, j, n ! general purpose integer
+ INTEGER :: i, n ! general purpose integer
+ INTEGER(SIZE_T) :: i_sz, j_sz ! general purpose integer
INTEGER :: has ! general purpose integer
INTEGER :: type_class
INTEGER(SIZE_T) :: type_size
@@ -1375,14 +1392,14 @@ CONTAINS
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
+ DO i_sz=1, wdata(1)%len
+ ptr(1)%data(i_sz) = INT(wdata(1)%len) - INT(i_sz) + 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.)
+ DO i_sz = 3, wdata(2)%len
+ ptr(2)%data(i_sz) = ptr(2)%data(i_sz-1_size_t) + ptr(2)%data(i_sz-2_size_t) ! (1 1 2 3 5 8 etc.)
ENDDO
wdata(2)%p = C_LOC(ptr(2)%data(1))
@@ -1439,7 +1456,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf3(i) .NE. bufr3(i) ) THEN
+ CALL VERIFY("h5ltread_dataset_f", buf3(i), bufr3(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufr3(i), ' and ', buf3(i)
STOP
@@ -1473,7 +1491,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf4(i) .NE. bufr4(i) ) THEN
+ CALL VERIFY("h5ltread_dataset_double_f", buf4(i), bufr4(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufr4(i), ' and ', buf4(i)
STOP
@@ -1530,8 +1549,9 @@ CONTAINS
DO i = 1, INT(dims_vl(1))
CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] )
- DO j = 1, rdata(i)%len
- IF(ptr_r(j).NE.ptr(i)%data(j))THEN
+ DO j_sz = 1, rdata(i)%len
+ CALL VERIFY("h5ltread_dataset_f", ptr_r(j_sz), ptr(i)%data(j_sz), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'Writing/Reading variable-length dataset failed'
STOP
ENDIF
@@ -1793,7 +1813,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf3(i) .NE. bufr3(i) ) THEN
+ CALL VERIFY("h5ltget_attribute_f",buf3(i), bufr3(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufr3(i), ' and ', buf3(i)
STOP
@@ -1841,7 +1862,8 @@ CONTAINS
! compare read and write buffers.
!
DO i = 1, DIM1
- IF ( buf4(i) .NE. bufr4(i) ) THEN
+ CALL VERIFY("h5ltget_attribute_f",buf4(i), bufr4(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufr4(i), ' and ', buf4(i)
STOP
diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90
index 822f116..62d291f 100644
--- a/hl/fortran/test/tsttable.F90
+++ b/hl/fortran/test/tsttable.F90
@@ -44,6 +44,9 @@ END MODULE TSTTABLE
MODULE TSTTABLE_TESTS
+ USE TH5_MISC_GEN
+ IMPLICIT NONE
+
CONTAINS
!-------------------------------------------------------------------------
@@ -283,7 +286,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufrr(i) .NE. bufr(i) ) THEN
+ CALL VERIFY("h5tbread_field_name_f", bufrr(i), bufr(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@@ -298,7 +302,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufdr(i) .NE. bufd(i) ) THEN
+ CALL VERIFY("h5tbread_field_name_f", bufdr(i), bufd(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufdr(i), ' and ', bufd(i)
STOP
@@ -315,7 +320,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufrr(i) .NE. bufr(i) ) THEN
+ CALL VERIFY("h5tbread_field_name_f", bufrr(i), bufr(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@@ -362,7 +368,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufsr(i) .NE. bufs(i) ) THEN
+ CALL VERIFY("h5tbread_field_index_f", bufsr(i), bufs(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufsr(i), ' and ', bufs(i)
STOP
@@ -376,7 +383,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufir(i) .NE. bufi(i) ) THEN
+ CALL VERIFY("h5tbread_field_index_f", bufir(i), bufi(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufir(i), ' and ', bufi(i)
STOP
@@ -390,7 +398,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufrr(i) .NE. bufr(i) ) THEN
+ CALL VERIFY("h5tbread_field_index_f", bufrr(i), bufr(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@@ -404,7 +413,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufdr(i) .NE. bufd(i) ) THEN
+ CALL VERIFY("h5tbread_field_index_f", bufdr(i), bufd(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufdr(i), ' and ', bufd(i)
STOP
@@ -419,7 +429,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufrr(i) .NE. bufr(i) ) THEN
+ CALL VERIFY("h5tbread_field_index_f", bufrr(i), bufr(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@@ -444,7 +455,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
- IF ( bufrr(i) .NE. bufr(i) ) THEN
+ CALL VERIFY("h5tbread_field_index_f", bufrr(i), bufr(i), errcode)
+ IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@@ -670,11 +682,12 @@ SUBROUTINE test_table2()
CALL h5tbread_table_f(file_id, table_name_fill, nfields, dst_size, dst_offset, dst_sizes, f_ptr3, errcode)
DO i = 1, nfields
- IF(r_data(i)%name.NE.fill_data(i)%name.OR. &
- r_data(i)%lati.NE.fill_data(i)%lati.OR. &
- r_data(i)%long.NE.fill_data(i)%long.OR. &
- r_data(i)%pressure.NE.fill_data(i)%pressure.OR. &
- r_data(i)%temperature.NE.fill_data(i)%temperature)THEN
+ CALL VERIFY("h5tbread_table_f", r_data(i)%name, fill_data(i)%name, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%lati, fill_data(i)%lati, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%long, fill_data(i)%long, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%pressure, fill_data(i)%pressure, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%temperature, fill_data(i)%temperature, errcode)
+ IF (errcode .NE.0 ) THEN
PRINT*,'H5TBmake/read_table_f --filled-- FAILED'
STOP
ENDIF
@@ -693,11 +706,12 @@ SUBROUTINE test_table2()
CALL h5tbread_table_f(file_id, table_name, nfields, dst_size, dst_offset, dst_sizes, f_ptr3, errcode)
DO i = 1, nfields
- IF(r_data(i)%name.NE.p_data(i)%name.OR. &
- r_data(i)%lati.NE.p_data(i)%lati.OR. &
- r_data(i)%long.NE.p_data(i)%long.OR. &
- r_data(i)%pressure.NE.p_data(i)%pressure.OR. &
- r_data(i)%temperature.NE.p_data(i)%temperature)THEN
+ CALL VERIFY("h5tbread_table_f", r_data(i)%name, p_data(i)%name, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%lati, p_data(i)%lati, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%long, p_data(i)%long, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%pressure, p_data(i)%pressure, errcode)
+ CALL VERIFY("h5tbread_table_f", r_data(i)%temperature, p_data(i)%temperature, errcode)
+ IF (errcode .NE.0 ) THEN
PRINT*,'H5TBmake/read_table_f FAILED'
STOP
ENDIF