@@ -7,7 +7,8 @@ program deflate_test
77implicit none (type, external )
88
99type (netcdf_file) :: h
10- integer , parameter :: N= 1000
10+ integer , parameter :: N= 250
11+ ! ! don't use too big otherwise platform/version dependent autochunk fouls up test ~ 4MB
1112integer :: crat, chunks(3 )
1213integer :: fsize
1314
@@ -40,7 +41,10 @@ program deflate_test
4041if (.not. h% is_chunked(' big2' )) error stop ' #1 not chunked layout'
4142
4243call h% chunks(' big2' , chunks(:2 ))
43- if (any (chunks(:2 ) /= [1000 , 1000 ])) error stop ' #1 get_chunk mismatch'
44+ if (any (chunks(:2 ) /= [N, N])) then
45+ write (stderr,* ) ' #1 chunk size' , chunks(:2 )
46+ error stop ' #1 auto chunk unexpected chunk size'
47+ endif
4448
4549if (.not. h% is_contig(' small_contig' )) error stop ' #1 not contig layout'
4650call h% chunks(' small_contig' , chunks(:2 ))
@@ -55,7 +59,8 @@ program deflate_test
5559
5660call h% write (' big3_autochunk' , big3)
5761call h% chunks(' big3_autochunk' , chunks)
58- if (any (chunks /= [500 ,500 ,2 ])) then
62+ if (any (chunks(:2 ) /= [N, N])) then
63+ ! ! chunks(3) varies based on platform
5964 write (stderr,* ) ' #2 chunk size' , chunks
6065 error stop ' #2 auto chunk unexpected chunk size'
6166endif
@@ -72,7 +77,7 @@ program deflate_test
7277
7378call h% write (' ibig3' , ibig3(:N-10 ,:N-20 ,:))
7479call h% chunks(' ibig3' , chunks)
75- if (any (chunks /= [495 , 490 , 2 ])) then
80+ if (any (chunks(: 2 ) /= [N -10 , N -20 ])) then
7681 write (stderr,* ) ' #3 chunk size' , chunks
7782 error stop ' #3 auto chunk unexpected chunk size'
7883endif
0 commit comments