Skip to content

Commit

Permalink
Fixed spacing issues in example tests. (#3979)
Browse files Browse the repository at this point in the history
* The space difference in the Fortran examples must be fixed to match the expected output for compression filter examples.
  • Loading branch information
brtnfld authored Feb 2, 2024
1 parent 0843a8c commit 6e42618
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 33 deletions.
12 changes: 7 additions & 5 deletions HDF5Examples/FORTRAN/H5D/h5ex_d_checksum.F90
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,17 @@ PROGRAM main
!
nelmts = 0
CALL H5Pget_filter_f(dcpl, 0, flags, nelmts, cd_values, MaxChrLen, name, filter_id, hdferr)
WRITE(*,'("Filter type is: ")', ADVANCE='NO')
WRITE(*,'(A,1X)', ADVANCE='NO') "Filter type is:"
IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
WRITE(*,'(" H5Z_FILTER_DEFLATE_F")')
WRITE(*,'(A)') "H5Z_FILTER_DEFLATE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SHUFFLE_F)THEN
WRITE(*,'(" H5Z_FILTER_SHUFFLE_F")')
WRITE(*,'(A)') "H5Z_FILTER_SHUFFLE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_FLETCHER32_F)THEN
WRITE(*,'(" H5Z_FILTER_FLETCHER32_F")')
WRITE(*,'(A)') "H5Z_FILTER_FLETCHER32_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
WRITE(*,'(" H5Z_FILTER_SZIP_F")')
WRITE(*,'(A)') "H5Z_FILTER_SZIP_F"
ELSE
WRITE(*,'(A)') "UNKNOWN"
ENDIF
!
! Read the data using the default properties.
Expand Down
12 changes: 7 additions & 5 deletions HDF5Examples/FORTRAN/H5D/h5ex_d_gzip.F90
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,17 @@ PROGRAM main
!
nelmts = 1
CALL H5Pget_filter_f(dcpl, 0, flags, nelmts, cd_values, MaxChrLen, name, filter_id, hdferr)
WRITE(*,'("Filter type is: ")', ADVANCE='NO')
WRITE(*,'(A,1X)', ADVANCE='NO') "Filter type is:"
IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
WRITE(*,'(" H5Z_FILTER_DEFLATE_F")')
WRITE(*,'(A)') "H5Z_FILTER_DEFLATE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SHUFFLE_F)THEN
WRITE(*,'(" H5Z_FILTER_SHUFFLE_F")')
WRITE(*,'(A)') "H5Z_FILTER_SHUFFLE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_FLETCHER32_F)THEN
WRITE(*,'(" H5Z_FILTER_FLETCHER32_F")')
WRITE(*,'(A)') "H5Z_FILTER_FLETCHER32_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
WRITE(*,'(" H5Z_FILTER_SZIP_F")')
WRITE(*,'(A)') "H5Z_FILTER_SZIP_F"
ELSE
WRITE(*,'(A)') "UNKNOWN"
ENDIF
!
! Read the data using the default properties.
Expand Down
14 changes: 8 additions & 6 deletions HDF5Examples/FORTRAN/H5D/h5ex_d_nbit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,19 @@ PROGRAM main
! first filter because we know that we only added one filter.
!
CALL H5Pget_filter_f(dcpl, 0, flags, nelmts, cd_values, INT(MaxChrLen, SIZE_T), name, filter_id, hdferr)
WRITE(*,'("Filter type is: ")', ADVANCE='NO')
WRITE(*,'(A,1X)', ADVANCE='NO') "Filter type is:"
IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
WRITE(*,'(" H5Z_FILTER_DEFLATE_F")')
WRITE(*,'(A)') "H5Z_FILTER_DEFLATE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SHUFFLE_F)THEN
WRITE(*,'(" H5Z_FILTER_SHUFFLE_F")')
WRITE(*,'(A)') "H5Z_FILTER_SHUFFLE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_FLETCHER32_F)THEN
WRITE(*,'(" H5Z_FILTER_FLETCHER32_F")')
WRITE(*,'(A)') "H5Z_FILTER_FLETCHER32_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
WRITE(*,'(" H5Z_FILTER_SZIP_F")')
WRITE(*,'(A)') "H5Z_FILTER_SZIP_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_NBIT_F)THEN
WRITE(*,'(" H5Z_FILTER_NBIT_F")')
WRITE(*,'(A)') "H5Z_FILTER_NBIT_F"
ELSE
WRITE(*,'(A)') "UNKNOWN"
ENDIF
!
! Read the data using the default properties.
Expand Down
16 changes: 9 additions & 7 deletions HDF5Examples/FORTRAN/H5D/h5ex_d_soint.F90
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,21 @@ PROGRAM main
!
nelmts = 1
CALL H5Pget_filter_f(dcpl, 0, flags, nelmts, cd_values, INT(MaxChrLen, SIZE_T), name, filter_id, hdferr)
WRITE(*,'("Filter type is: ")', ADVANCE='NO')
WRITE(*,'(A,1X)', ADVANCE='NO') "Filter type is:"
IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
WRITE(*,'(" H5Z_FILTER_DEFLATE_F")')
WRITE(*,'(A)') "H5Z_FILTER_DEFLATE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SHUFFLE_F)THEN
WRITE(*,'(" H5Z_FILTER_SHUFFLE_F")')
WRITE(*,'(A)') "H5Z_FILTER_SHUFFLE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_FLETCHER32_F)THEN
WRITE(*,'(" H5Z_FILTER_FLETCHER32_F")')
WRITE(*,'(A)') "H5Z_FILTER_FLETCHER32_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
WRITE(*,'(" H5Z_FILTER_SZIP_F")')
WRITE(*,'(A)') "H5Z_FILTER_SZIP_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_NBIT_F)THEN
WRITE(*,'(" H5Z_FILTER_NBIT_F")')
WRITE(*,'(A)') "H5Z_FILTER_NBIT_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SCALEOFFSET_F)THEN
WRITE(*,'(" H5Z_FILTER_SCALEOFFSET_F")')
WRITE(*,'(A)') "H5Z_FILTER_SCALEOFFSET_F"
ELSE
WRITE(*,'(A)') "UNKNOWN"
ENDIF
!
! Read the data using the default properties.
Expand Down
12 changes: 7 additions & 5 deletions HDF5Examples/FORTRAN/H5D/h5ex_d_szip.F90
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,22 @@ PROGRAM main

nelmts = 1
CALL H5Pget_filter_f(dcpl, 0, flags, nelmts, cd_values, INT(MaxChrLen,SIZE_T), name, filter_id, hdferr)
WRITE(*,'("Filter type is: ")', ADVANCE='NO')
WRITE(*,'(A,1X)', ADVANCE='NO') "Filter type is:"
IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
WRITE(*,'(" H5Z_FILTER_DEFLATE_F")')
WRITE(*,'(A)') "H5Z_FILTER_DEFLATE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SHUFFLE_F)THEN
WRITE(*,'(" H5Z_FILTER_SHUFFLE_F")')
WRITE(*,'(A)') "H5Z_FILTER_SHUFFLE_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_FLETCHER32_F)THEN
WRITE(*,'(" H5Z_FILTER_FLETCHER32_F")')
WRITE(*,'(A)') "H5Z_FILTER_FLETCHER32_F"
ELSE IF(filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
WRITE(*,'(" H5Z_FILTER_SZIP_F")')
WRITE(*,'(A)') "H5Z_FILTER_SZIP_F"
! DEFINED ONLY IN F2003 hdf5 branch
! ELSE IF(filter_id.EQ.H5Z_FILTER_NBIT_F)THEN
! WRITE(*,'(" H5Z_FILTER_NBIT_F")')
! ELSE IF(filter_id.EQ.H5Z_FILTER_SCALEOFFSET_F)THEN
! WRITE(*,'(" H5Z_FILTER_SCALEOFFSET_F")')
ELSE
WRITE(*,'(A)') "UNKNOWN"
ENDIF
!
! Read the data using the default properties.
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5D/tfiles/18/h5ex_d_checksum.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Filter type is: H5Z_FILTER_FLETCHER32_F
Filter type is: H5Z_FILTER_FLETCHER32_F
Maximum value in DS1 is: 1984
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5D/tfiles/18/h5ex_d_gzip.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Filter type is: H5Z_FILTER_DEFLATE_F
Filter type is: H5Z_FILTER_DEFLATE_F
Maximum value in DS1 is: 1890
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5D/tfiles/18/h5ex_d_nbit.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Filter type is: H5Z_FILTER_NBIT_F
Filter type is: H5Z_FILTER_NBIT_F
Maximum value in DS1 is: 1890
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5D/tfiles/18/h5ex_d_soint.tst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Maximum value in write buffer is: 1890
Minimum value in write buffer is: -63
Filter type is: H5Z_FILTER_SCALEOFFSET_F
Filter type is: H5Z_FILTER_SCALEOFFSET_F
Maximum value in DS1 is: 1890
Minimum value in DS1 is: -63
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5D/tfiles/18/h5ex_d_szip.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Filter type is: H5Z_FILTER_SZIP_F
Filter type is: H5Z_FILTER_SZIP_F
Maximum value in DS1 is: 1890

0 comments on commit 6e42618

Please sign in to comment.