summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5Z.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2005-01-11 01:37:00 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2005-01-11 01:37:00 (GMT)
commit2fcaf3e0f3fc05b5af2806e55c0658a13e49e3fb (patch)
tree8e3bbe60c14603a6905c38292cd8ca03d271f9aa /fortran/test/tH5Z.f90
parentc04b612eb42b8b63ed4b4f966d53381f60f5119a (diff)
downloadhdf5-2fcaf3e0f3fc05b5af2806e55c0658a13e49e3fb.zip
hdf5-2fcaf3e0f3fc05b5af2806e55c0658a13e49e3fb.tar.gz
hdf5-2fcaf3e0f3fc05b5af2806e55c0658a13e49e3fb.tar.bz2
[svn-r9803] Purpose: Bug fix
Description: Fortran szip test had a wrong logic; as a result wrong return values were reported in the absence of the SZIP library, and it was skipped when encoder was disable Solution: Fixed the test Now SZIP fortran test should report "SKIP" only when SZIP is not configured in. Platforms tested: tg-login in parallel mode, copper, mir with new PGI compilers and shared SZIP libraries. All platforms were tested with SZIP not available SZIP with encoder/decoder SZIP with decoder only Misc. update:
Diffstat (limited to 'fortran/test/tH5Z.f90')
-rw-r--r--fortran/test/tH5Z.f9038
1 files changed, 22 insertions, 16 deletions
diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.f90
index c64d99b..99e3dba 100644
--- a/fortran/test/tH5Z.f90
+++ b/fortran/test/tH5Z.f90
@@ -195,31 +195,36 @@
!
! Verify that SZIP exists and has an encoder
!
- CALL h5zget_filter_info_f(H5Z_FILTER_SZIP_F, config_flag, error)
- CALL check("h5zget_filter_info", error, total_error)
- if ( IAND(config_flag, H5Z_FILTER_ENCODE_ENABLED_F) .EQ. 0 ) then
- szip_flag = .FALSE.
- total_error = -1
- return
- endif
- CALL h5zfilter_avail_f(H5Z_FILTER_SZIP_F, flag, error)
+ CALL h5zfilter_avail_f(H5Z_FILTER_SZIP_F, szip_flag, error)
CALL check("h5zfilter_avail", error, total_error)
+ ! Quit if failed
+ if (error .ne. 0) return
+
+ ! Skip if no SZIP available
+ if (.NOT. szip_flag)then
+ return
+
+ else !SZIP available
+
+ ! Continue
+ CALL h5zget_filter_info_f(H5Z_FILTER_SZIP_F, config_flag, error)
+ CALL check("h5zget_filter_info_f", error, total_error)
+ ! Quit if failed
+ if (error .ne. 0) return
!
! Make sure h5zget_filter_info_f returns the right flag
!
- if( flag ) then
- if ( config_flag .NE. IOR( H5Z_FILTER_ENCODE_ENABLED_F, H5Z_FILTER_DECODE_ENABLED_F) ) then
+ if( szip_flag ) then
+ if ( config_flag .NE. IOR(H5Z_FILTER_ENCODE_ENABLED_F, H5Z_FILTER_DECODE_ENABLED_F)) then
error = -1
- CALL check("h5zget_filter_info config_flag", error, total_error)
- endif
- else
- if ( config_flag .NE. 0 ) then
- error = -1
- CALL check("h5zget_filter_info config_flag", error, total_error)
+ CALL check("h5zget_filter_info_f config_flag", error, total_error)
endif
endif
+ ! Continue only when encoder is available
+ if ( IAND(config_flag, H5Z_FILTER_ENCODE_ENABLED_F) .EQ. 0 ) return
+
options_mask = H5_SZIP_NN_OM_F
pix_per_block = 32
!
@@ -384,6 +389,7 @@
CALL check("h5fclose_f", error, total_error)
if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
+ endif ! SZIP available
RETURN
END SUBROUTINE szip_test