147 IMPLICIT NONE
148 INTEGER I1,I2,IERR
149 INTEGER allocok
150 ierr=0
151 panel_flag=.false.
152 IF(allocated(i_shift_first_hbuf))THEN
153 DEALLOCATE(i_shift_first_hbuf)
154 ENDIF
155 IF(allocated(i_shift_second_hbuf))THEN
156 DEALLOCATE(i_shift_second_hbuf)
157 ENDIF
158 IF(allocated(i_shift_cur_hbuf))THEN
159 DEALLOCATE(i_shift_cur_hbuf)
160 ENDIF
161 IF(allocated(i_rel_pos_cur_hbuf))THEN
162 DEALLOCATE(i_rel_pos_cur_hbuf)
163 ENDIF
164 IF(allocated(last_iorequest))THEN
165 DEALLOCATE(last_iorequest)
166 ENDIF
167 IF(allocated(cur_hbuf))THEN
168 DEALLOCATE(cur_hbuf)
169 ENDIF
170 dim_buf_io = int(keep_ooc(100),8)
171 ALLOCATE(i_shift_first_hbuf(ooc_nb_file_type),
172 & stat=allocok)
173 IF (allocok > 0) THEN
174 IF (icntl1>0) THEN
175 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
176 ENDIF
177 i1 = -13
178 i2 = ooc_nb_file_type
179 ierr=-1
180 RETURN
181 ENDIF
182 ALLOCATE(i_shift_second_hbuf(ooc_nb_file_type),
183 & stat=allocok)
184 IF (allocok > 0) THEN
185 IF (icntl1>0) THEN
186 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
187 ENDIF
188 i1 = -13
189 i2 = ooc_nb_file_type
190 ierr=-1
191 RETURN
192 ENDIF
193 ALLOCATE(i_shift_cur_hbuf(ooc_nb_file_type),
194 & stat=allocok)
195 IF (allocok > 0) THEN
196 IF (icntl1>0) THEN
197 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
198 ENDIF
199 i1 = -13
200 i2 = ooc_nb_file_type
201 ierr=-1
202 RETURN
203 ENDIF
204 ALLOCATE(i_rel_pos_cur_hbuf(ooc_nb_file_type),
205 & stat=allocok)
206 IF (allocok > 0) THEN
207 IF (icntl1>0) THEN
208 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
209 ENDIF
210 i1 = -13
211 i2 = ooc_nb_file_type
212 ierr=-1
213 RETURN
214 ENDIF
215 ALLOCATE(last_iorequest(ooc_nb_file_type),
216 & stat=allocok)
217 IF (allocok > 0) THEN
218 IF (icntl1>0) THEN
219 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
220 ENDIF
221 i1 = -13
222 i2 = ooc_nb_file_type
223 ierr=-1
224 RETURN
225 ENDIF
226 ALLOCATE(cur_hbuf(ooc_nb_file_type),
227 & stat=allocok)
228 IF (allocok > 0) THEN
229 IF (icntl1>0) THEN
230 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
231 ENDIF
232 i1 = -13
233 i2 = ooc_nb_file_type
234 ierr=-1
235 RETURN
236 ENDIF
237 ooc_fct_type_loc=ooc_nb_file_type
238 ALLOCATE(buf_io(dim_buf_io), stat=allocok)
239 IF (allocok > 0) THEN
240 IF (icntl1>0) THEN
241 WRITE(icntl1,*) 'PB allocation in DMUMPS_INIT_OOC'
242 ENDIF
243 i1 = -13
245 RETURN
246 ENDIF
247 panel_flag=(keep_ooc(201).EQ.1)
248 IF (panel_flag) THEN
249 ierr=0
250 keep_ooc(228)=0
251 IF(allocated(addvirtlibre))THEN
252 DEALLOCATE(addvirtlibre)
253 ENDIF
254 ALLOCATE(addvirtlibre(ooc_nb_file_type), stat=allocok)
255 IF (allocok > 0) THEN
256 IF (icntl1>0) THEN
257 WRITE(icntl1,*) 'PB allocation in ',
258 & 'DMUMPS_INIT_OOC_BUF_PANEL'
259 ENDIF
260 ierr=-1
261 i1=-13
262 i2=ooc_nb_file_type
263 RETURN
264 ENDIF
265 addvirtlibre(1:ooc_nb_file_type)=0_8
266 IF(allocated(nextaddvirtbuffer))THEN
267 DEALLOCATE(nextaddvirtbuffer)
268 ENDIF
269 ALLOCATE(nextaddvirtbuffer(ooc_nb_file_type), stat=allocok)
270 IF (allocok > 0) THEN
271 IF (icntl1>0) THEN
272 WRITE(icntl1,*) 'PB allocation in ',
273 & 'DMUMPS_INIT_OOC_BUF_PANEL'
274 ENDIF
275 ierr=-1
276 i1=-13
277 i2=ooc_nb_file_type
278 RETURN
279 ENDIF
280 nextaddvirtbuffer(1:ooc_nb_file_type) = bufferempty
281 IF(allocated(first_vaddr_in_buf))THEN
282 DEALLOCATE(first_vaddr_in_buf)
283 ENDIF
284 ALLOCATE(first_vaddr_in_buf(ooc_nb_file_type), stat=allocok)
285 IF (allocok > 0) THEN
286 IF (icntl1>0) THEN
287 WRITE(icntl1,*) 'PB allocation in ',
288 & 'DMUMPS_INIT_OOC_BUF_PANEL'
289 ENDIF
290 ierr=-1
291 i1=-13
292 i2=ooc_nb_file_type
293 RETURN
294 ENDIF
295 CALL dmumps_ooc_init_db_buffer_panel()
296 ELSE
297 CALL dmumps_ooc_init_db_buffer()
298 ENDIF
299 keep_ooc(223)=int(hbuf_size)
300 RETURN