@@ -77,7 +77,7 @@ subroutine test_write_deflate(fn, N, mpi_id, Nmpi)
77
77
if (debug) print ' (a,i0,1x,2i5,2x,2i5)' , " write_deflate partition: mpi_id, i0, i1 " , mpi_id, i0, i1
78
78
79
79
call 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 ])
81
81
call h5f% close ()
82
82
83
83
deallocate (A)
@@ -131,21 +131,22 @@ subroutine test_deflate_whole(fn, N)
131
131
132
132
call h5f% open (fn, action= ' w' , comp_lvl= 3 , mpi= .true. )
133
133
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 ])
135
135
call h5f% chunks(' /A' , chunks)
136
136
if (chunks(1 ) /= 4 .or. chunks(3 ) /= 1 ) then
137
137
write (stderr, ' (a,3I5)' ) " expected chunks: 4,*,1 but got chunks " , chunks
138
138
error stop ' #2 manual chunk unexpected chunk size'
139
139
endif
140
140
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)
142
142
call h5f% chunks(' /A_autochunk' , chunks)
143
143
if (any (chunks < 1 )) error stop ' #2 auto chunk unexpected chunk size'
144
144
145
145
call h5f% close ()
146
146
147
- call h5f% open (fn, action= ' r' , mpi= .false. )
148
147
if (mpi_id == 0 ) then
148
+ call h5f% open (fn, action= ' r' , mpi= .false. )
149
+
149
150
fsize = real (h5f% filesize())
150
151
crat = (2 * N(1 ) * N(2 ) * 4 * storage_size(A) / 8 ) / fsize
151
152
! ! 2* since two datasets same size
@@ -157,9 +158,9 @@ subroutine test_deflate_whole(fn, N)
157
158
else
158
159
print * , " test_deflate_whole: MPI commpression was disabled, so " // fn // " was not compressed."
159
160
endif
160
- endif
161
161
162
- call h5f% close ()
162
+ call h5f% close ()
163
+ endif
163
164
164
165
end subroutine test_deflate_whole
165
166
@@ -205,8 +206,9 @@ subroutine test_deflate_slice(fn, N)
205
206
if (any (chunks < 1 )) error stop ' #3 auto chunk unexpected chunk size'
206
207
call h5f% close ()
207
208
208
- call h5f% open (fn, action= ' r' , mpi= .false. )
209
209
if (mpi_id == 0 ) then
210
+ call h5f% open (fn, action= ' r' , mpi= .false. )
211
+
210
212
fsize = real (h5f% filesize())
211
213
crat = (N(1 ) * N(2 ) * storage_size(A) / 8 ) / fsize
212
214
@@ -217,9 +219,9 @@ subroutine test_deflate_slice(fn, N)
217
219
else
218
220
print * , " test_deflate_slice: MPI commpression was disabled, so " // fn // " was not compressed."
219
221
endif
220
- endif
221
222
222
- call h5f% close ()
223
+ call h5f% close ()
224
+ endif
223
225
224
226
end subroutine test_deflate_slice
225
227
0 commit comments