@@ -77,7 +77,7 @@ subroutine test_write_deflate(fn, N, mpi_id, Nmpi)
7777if (debug) print ' (a,i0,1x,2i5,2x,2i5)' , " write_deflate partition: mpi_id, i0, i1 " , mpi_id, i0, i1
7878
7979call h5f% open (fn, action= ' w' , comp_lvl= 1 , mpi= .true. )
80- call h5f% write (' /A' , A, N, istart= i0, iend= i1, chunk_size= [5 , 50 ])
80+ call h5f% write (' /A' , A, dset_dims = N, istart= i0, iend= i1, chunk_size= [5 , 50 ])
8181call h5f% close ()
8282
8383deallocate (A)
@@ -131,21 +131,22 @@ subroutine test_deflate_whole(fn, N)
131131
132132call h5f% open (fn, action= ' w' , comp_lvl= 3 , mpi= .true. )
133133
134- call h5f% write (' /A' , A, [N(1 ), N(2 ), 4 ], istart= i0, iend= i1, chunk_size= [4 , 20 , 1 ])
134+ call h5f% write (' /A' , A, dset_dims = [N(1 ), N(2 ), 4 ], istart= i0, iend= i1, chunk_size= [4 , 20 , 1 ])
135135call h5f% chunks(' /A' , chunks)
136136if (chunks(1 ) /= 4 .or. chunks(3 ) /= 1 ) then
137137 write (stderr, ' (a,3I5)' ) " expected chunks: 4,*,1 but got chunks " , chunks
138138 error stop ' #2 manual chunk unexpected chunk size'
139139endif
140140
141- call h5f% write (' /A_autochunk' , A, [N(1 ), N(2 ), 4 ], istart= i0, iend= i1)
141+ call h5f% write (' /A_autochunk' , A, dset_dims = [N(1 ), N(2 ), 4 ], istart= i0, iend= i1)
142142call h5f% chunks(' /A_autochunk' , chunks)
143143if (any (chunks < 1 )) error stop ' #2 auto chunk unexpected chunk size'
144144
145145call h5f% close ()
146146
147- call h5f% open (fn, action= ' r' , mpi= .false. )
148147if (mpi_id == 0 ) then
148+ call h5f% open (fn, action= ' r' , mpi= .false. )
149+
149150 fsize = real (h5f% filesize())
150151 crat = (2 * N(1 ) * N(2 ) * 4 * storage_size(A) / 8 ) / fsize
151152 ! ! 2* since two datasets same size
@@ -157,9 +158,9 @@ subroutine test_deflate_whole(fn, N)
157158 else
158159 print * , " test_deflate_whole: MPI commpression was disabled, so " // fn // " was not compressed."
159160 endif
160- endif
161161
162- call h5f% close ()
162+ call h5f% close ()
163+ endif
163164
164165end subroutine test_deflate_whole
165166
@@ -205,8 +206,9 @@ subroutine test_deflate_slice(fn, N)
205206if (any (chunks < 1 )) error stop ' #3 auto chunk unexpected chunk size'
206207call h5f% close ()
207208
208- call h5f% open (fn, action= ' r' , mpi= .false. )
209209if (mpi_id == 0 ) then
210+ call h5f% open (fn, action= ' r' , mpi= .false. )
211+
210212 fsize = real (h5f% filesize())
211213 crat = (N(1 ) * N(2 ) * storage_size(A) / 8 ) / fsize
212214
@@ -217,9 +219,9 @@ subroutine test_deflate_slice(fn, N)
217219 else
218220 print * , " test_deflate_slice: MPI commpression was disabled, so " // fn // " was not compressed."
219221 endif
220- endif
221222
222- call h5f% close ()
223+ call h5f% close ()
224+ endif
223225
224226end subroutine test_deflate_slice
225227
0 commit comments