summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2005-06-22 18:23:21 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2005-06-22 18:23:21 (GMT)
commitea66068977639b7b2737bb9db1e59b26db914d1e (patch)
treebc1ce12c71d0f91dba3c2d0ddccd81862a588c89 /fortran/test
parentec071c6c149c44d9b3a056948502ca2af3b875b9 (diff)
downloadhdf5-ea66068977639b7b2737bb9db1e59b26db914d1e.zip
hdf5-ea66068977639b7b2737bb9db1e59b26db914d1e.tar.gz
hdf5-ea66068977639b7b2737bb9db1e59b26db914d1e.tar.bz2
[svn-r10970] Purpose: New feature/bug #350 fix
Description: When compiler flag was used to set the size of Fortran integer to 8 bytes, library would fail. Solution: Cleaned up the code; added detection of Fortran INTEGER type size and appropriately defined int_f type for C-stubs routines. Platforms tested: Solaris 2.8 32 and 64-bit, AIX 5.1 64-bit parallel PGI Fortran with -i8 flag on heping Absoft Fortran with -i8 flag on heping g95 on mir (Fortran integer is 8 bytes by default that cannot be changed - compiler bug ;-) AIX Fortran with -qintsize=8 32 and 64-bit modes on copper Misc. update:
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/fortranlib_test.f9013
-rw-r--r--fortran/test/tH5F.f904
-rw-r--r--fortran/test/tH5I.f905
-rw-r--r--fortran/test/tH5P.f9010
4 files changed, 13 insertions, 19 deletions
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index 6481c8b..b736edf 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -61,7 +61,6 @@
write(*,*) ' ========================== '
write(*,*) ' FORTRAN tests '
write(*,*) ' ========================== '
-
CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
if(total_error .eq. 0) then
@@ -76,7 +75,6 @@
endif
write(*,*)
! CALL h5check_version_f(1,4,4,total_error)
-
! write(*,*) '========================================='
! write(*,*) 'Testing FILE Interface '
! write(*,*) '========================================='
@@ -88,7 +86,6 @@
write(*, fmt = e_format) error_string
total_error = total_error + mounting_total_error
-
error_string = failure
CALL reopentest(cleanup, reopen_total_error)
IF (reopen_total_error == 0) error_string = success
@@ -96,7 +93,6 @@
write(*, fmt = '(58x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + reopen_total_error
-
error_string = failure
CALL file_close(cleanup, fclose_total_error)
IF (fclose_total_error == 0) error_string = success
@@ -113,7 +109,6 @@
write(*, fmt = e_format) error_string
total_error = total_error + fspace_total_error
-
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing DATASET Interface '
@@ -126,7 +121,6 @@
write(*, fmt = '(57x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + dataset_total_error
-
error_string = failure
CALL extenddsettest(cleanup, extend_dataset_total_error)
IF (extend_dataset_total_error == 0) error_string = success
@@ -134,7 +128,6 @@
write(*, fmt = '(46x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + extend_dataset_total_error
-
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing DATASPACE Interface '
@@ -204,7 +197,6 @@
! write(*,*) '========================================='
! write(*,*) 'Testing DATATYPE interface '
! write(*,*) '========================================='
-
error_string = failure
CALL basic_data_type_test(cleanup, basic_datatype_total_error)
IF (basic_datatype_total_error == 0) error_string = success
@@ -220,7 +212,6 @@
write(*, fmt = '(47x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + total_error_compoundtest
-
error_string = failure
CALL enumtest(cleanup, enum_total_error)
IF (enum_total_error == 0) error_string = success
@@ -228,8 +219,6 @@
write(*, fmt = '(51x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + enum_total_error
-
-
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing PROPERTY interface '
@@ -251,7 +240,6 @@
write(*, fmt = '(47x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + multi_file_total_error
-
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing ATTRIBUTE interface '
@@ -277,7 +265,6 @@
write(*, fmt = '(54x,a)', advance = 'no') ' '
write(*, fmt = e_format) error_string
total_error = total_error + identifier_total_error
-
error_string = failure
CALL filters_test(cleanup, z_total_error)
IF (z_total_error == 0) error_string = success
diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90
index d1e0064..46832bb 100644
--- a/fortran/test/tH5F.f90
+++ b/fortran/test/tH5F.f90
@@ -678,8 +678,10 @@
write(*,*) "File should be closed at this point, error"
endif
- if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ if(cleanup) then
+ CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
+ endif
deallocate(obj_ids)
RETURN
diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90
index 8790bc3..6864c4b 100644
--- a/fortran/test/tH5I.f90
+++ b/fortran/test/tH5I.f90
@@ -257,13 +257,14 @@
! Close the file by decrementing the reference count
CALL h5idec_ref_f(file_id, ref_count, error)
- CALL check("h5iinc_ref_f",error,total_error)
+ CALL check("h5idec_ref_f",error,total_error)
CALL verify("get file ref count wrong",ref_count,0,total_error)
-
! Try closing the file again (should fail)
+ CALL h5eset_auto_f(0, error)
CALL h5fclose_f(file_id, error)
CALL verify("file close should fail",error,-1,total_error)
! Clear the error stack from the file close failure
+ CALL h5eset_auto_f(1, error)
CALL h5eclear_f(error)
if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90
index 19a657f..af301aa 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.f90
@@ -44,6 +44,7 @@
!specified dataset
INTEGER(SIZE_T) :: namesize
INTEGER(HSIZE_T) :: size, buf_size
+ INTEGER :: idx
buf_size = 4*1024*1024
@@ -95,10 +96,13 @@
CALL check("h5pclose_f", error, total_error)
CALL h5sclose_f(space_id, error)
CALL check("h5sclose_f", error, total_error)
- ! Read dataset creation information
+ CALL h5fclose_f(file_id, error)
+
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error)
CALL h5dopen_f(file_id, "dset1", dataset_id, error)
CALL check("h5dopen_f",error,total_error)
+ ! Read dataset creation information
CALL h5dget_create_plist_f(dataset_id, plist_id, error)
CALL check("h5dget_create_plist_f",error,total_error)
CALL h5pget_external_count_f(plist_id, count, error)
@@ -108,7 +112,8 @@
total_error = total_error + 1
end if
namesize = 10
- CALL h5pget_external_f(plist_id, 0, namesize, name, file_offset, &
+ idx = 0
+ CALL h5pget_external_f(plist_id, idx, namesize, name, file_offset, &
file_bytes, error)
CALL check("h5pget_external_f",error,total_error)
if(file_offset .ne. 0 ) then
@@ -282,7 +287,6 @@
CALL check("h5fclose_f", error, total_error)
CALL h5pclose_f(fapl, error)
CALL check("h5pclose_f", error, total_error)
-
!
! Open the existing file.
!