diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2005-01-11 01:41:25 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2005-01-11 01:41:25 (GMT) |
commit | a6fe61916f26b523b781235bf6529b92e110d67c (patch) | |
tree | 3333934d0c7049abc32b2ea806281d6c47202cef | |
parent | e2eed3c9b532f6da2e896b6b4e9bb2b1208732dc (diff) | |
download | hdf5-a6fe61916f26b523b781235bf6529b92e110d67c.zip hdf5-a6fe61916f26b523b781235bf6529b92e110d67c.tar.gz hdf5-a6fe61916f26b523b781235bf6529b92e110d67c.tar.bz2 |
[svn-r9804] Purpose: Bug fix
Description: Fortran szip test was broken; brought changes from 1.7
Solution:
Platforms tested: mir, copper
Misc. update:
-rw-r--r-- | fortran/test/fortranlib_test.f90 | 3 | ||||
-rw-r--r-- | fortran/test/tH5Z.f90 | 38 |
2 files changed, 24 insertions, 17 deletions
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90 index d3f22ae..6481c8b 100644 --- a/fortran/test/fortranlib_test.f90 +++ b/fortran/test/fortranlib_test.f90 @@ -287,8 +287,9 @@ total_error = total_error + z_total_error CALL szip_test(szip_flag, cleanup, sz_total_error) - IF (.NOT. szip_flag) error_string = skip IF (sz_total_error == 0) error_string = success + ! Reset the flag is compression was not available + IF (.NOT. szip_flag) error_string = skip IF (sz_total_error .gt. 0) error_string = failure write(*, fmt = '(18a)', advance = 'no') ' SZIP filter test' write(*, fmt = '(53x,a)', advance = 'no') ' ' diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.f90 index c64d99b..592a19f 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 |