35
46
48 IMPLICIT NONE
49 INTEGER COMM_LOAD, ASS_IRECV
50 INTEGER N, INODE, FPERE, LIW
51 INTEGER, intent(inout) :: NOFFW, NPVW, NBTINYW
52 INTEGER, intent(inout) :: DET_EXPW, DET_SIGNW
53 COMPLEX, intent(inout) :: DET_MANTW
54 INTEGER(8) :: LA
55 INTEGER IW( LIW )
56 COMPLEX A( LA )
57 REAL UU, SEUIL
58 TYPE (CMUMPS_ROOT_STRUC) :: root
59 INTEGER COMM, MYID, LBUFR, LBUFR_BYTES
60 INTEGER LPTRAR, NELT
61 INTEGER ICNTL(60), KEEP(500)
62 INTEGER(8) KEEP8(150)
63 INTEGER NBFIN, SLAVEF,
64 & IFLAG, IERROR, LEAF, LPOOL
65 INTEGER(8) :: POSFAC, IPTRLU, LRLU, LRLUS
66 INTEGER IWPOS, IWPOSCB, COMP
67 INTEGER FRTPTR( N + 1 ), FRTELT( NELT )
68 INTEGER BUFR( LBUFR ), IPOOL(LPOOL),
69 & ITLOC(N+KEEP(253)), FILS(N), DAD( KEEP(28) ),
70 & ND( KEEP(28) ), FRERE( KEEP(28) )
71 INTEGER(8), INTENT(IN) :: PTRARW(LPTRAR), PTRAIW(LPTRAR)
72 COMPLEX :: RHS_MUMPS(KEEP(255))
73 INTEGER(8) :: PTRAST(KEEP(28))
74 INTEGER(8) :: PTRFAC(KEEP(28))
75 INTEGER(8) :: PAMASTER(KEEP(28))
76 INTEGER PTRIST(KEEP(28)), PTLUST_S(KEEP(28)),
77 & STEP(N), PIMASTER(KEEP(28)),
78 & NSTK_S(KEEP(28)), PERM(N),
79 & PROCNODE_STEPS(KEEP(28))
80 INTEGER ISTEP_TO_INIV2(KEEP(71)),
81 & TAB_POS_IN_PERE(SLAVEF+2,max(1,KEEP(56)))
82 DOUBLE PRECISION OPASSW, OPELIW
83 COMPLEX DBLARR(KEEP8(26))
84 INTEGER INTARR(KEEP8(27))
85 LOGICAL AVOID_DELAYED
86 INTEGER LPN_LIST
87 INTEGER PIVNUL_LIST(LPN_LIST)
88 REAL DKEEP(230)
89 INTEGER :: LRGROUPS(N)
90 INTEGER INOPV, IFINB, NFRONT, NPIV, IBEG_BLOCK, IEND_BLOCK
91 INTEGER :: IBEG_BLOCK_FOR_IPIV
92 INTEGER NASS, NBKJIB_ORIG, XSIZE
93 INTEGER NBLR_ORIG, IBEG_BLR, IEND_BLR
94 INTEGER Inextpiv
95 LOGICAL LASTBL
96 INTEGER(8) :: POSELT
97 INTEGER IOLDPS, allocok, K263,J
98 INTEGER idummy
99 REAL UUTEMP
100 LOGICAL STATICMODE
101 REAL SEUIL_LOC
102 INTEGER , ALLOCATABLE, DIMENSION ( : ) :: IPIV
103 INTEGER(8) :: LAFAC
104 INTEGER LIWFAC, STRAT, LNextPiv2beWritten,
105 & UNextPiv2beWritten, IFLAG_OOC,
106 & PP_FIRST2SWAP_L, PP_FIRST2SWAP_U,
107 & PP_LastPIVRPTRFilled_L,
108 & PP_LastPIVRPTRFilled_U
109 TYPE(IO_BLOCK) :: MonBloc
110 LOGICAL LAST_CALL
111 INTEGER CURRENT_BLR, NELIM
112 LOGICAL LR_ACTIVATED, COMPRESS_PANEL
113 LOGICAL OOCWRITE_COMPATIBLE_WITH_BLR,
114 & OOC_EFFECTIVE_ON_FRONT,
115 & OOC_EFF_AND_WRITE_BYPANEL
116 INTEGER :: IROW_L, NVSCHUR, NSLAVES
117 INTEGER :: PIVOT_OPTION, LAST_COL, FIRST_COL
118 INTEGER :: PARPIV_T1
119 INTEGER FIRST_BLOCK, LAST_BLOCK
120 INTEGER :: INFO_TMP(2)
121 INTEGER :: MAXI_RANK
122 INTEGER HF, NPARTSASS, NPARTSCB, NB_BLR, END_I
123 INTEGER MAXI_CLUSTER, LWORK
124 TYPE(LRB_TYPE), DIMENSION(1), TARGET :: BLR_DUMMY
125 INTEGER, POINTER, DIMENSION(:) :: PTDummy
126 TYPE(LRB_TYPE), POINTER, DIMENSION(:) :: ACC_LUA
127 INTEGER, POINTER, DIMENSION(:) :: BEGS_BLR
128 TYPE(LRB_TYPE), POINTER, DIMENSION(:) :: BLR_L, BLR_U, BLR_SEND
129 COMPLEX, POINTER, DIMENSION(:) :: DIAG
130 TYPE(LRB_TYPE), POINTER, DIMENSION(:) :: BLR_PANEL
131 INTEGER, POINTER, DIMENSION(:) :: BEGS_BLR_TMP, BEGS_BLR_STATIC
132 INTEGER :: DIAGSIZ_STA, DIAGSIZ_DYN, DPOS, LorU, I, IP, MEM,
133 & MEM_TOT
134 INTEGER(8) :: POSELT_DIAG
135 CHARACTER(len=1) :: DIR
136 COMPLEX, ALLOCATABLE :: WORK(:), TAU(:)
137 INTEGER, ALLOCATABLE :: JPVT(:)
138 REAL, ALLOCATABLE :: RWORK(:)
139 COMPLEX, ALLOCATABLE :: BLOCK(:,:)
140 INTEGER :: OMP_NUM
141 INTEGER(8) :: UPOS, LPOS
142 INTEGER :: MY_NUM
143 include 'mumps_headers.h'
144 NULLIFY(blr_l,blr_u)
145 NULLIFY(ptdummy)
146 NULLIFY(acc_lua)
147 NULLIFY(begs_blr)
148 NULLIFY(blr_l, blr_u, blr_send)
149 NULLIFY(diag)
150 NULLIFY(blr_panel)
151 NULLIFY( begs_blr_tmp, begs_blr_static)
152 IF (keep(206).GE.1) THEN
153 inextpiv = 1
154 ELSE
155 inextpiv = 0
156 ENDIF
157 idummy = 0
158 ioldps = ptlust_s(step( inode ))
159 poselt = ptrast(step( inode ))
160 xsize = keep(ixsz)
161 nfront = iw(ioldps+xsize)
162 nass = iabs(iw(ioldps+2+xsize))
163 iw(ioldps+3+xsize) = -99999
164 lr_activated = (iw(ioldps+xxlr).GT.0)
165 compress_panel = (iw(ioldps+xxlr).GE.2)
166 oocwrite_compatible_with_blr =
167 & ( .NOT.lr_activated.OR. (.NOT.compress_panel).OR.
168 & (keep(486).NE.2)
169 & )
170 ooc_effective_on_front= ((keep(201).EQ.1).AND.
171 & oocwrite_compatible_with_blr)
172 parpiv_t1 = 0
173 inopv = 0
174 seuil_loc = seuil
175 IF(keep(97) .EQ. 0) THEN
176 staticmode = .false.
177 ELSE
178 staticmode = .true.
179 ENDIF
180 IF (avoid_delayed) THEN
181 staticmode = .true.
182 uutemp=uu
183 seuil_loc =
max(seuil,epsilon(seuil))
184 ELSE
185 uutemp=uu
186 ENDIF
188 IF (.not.lr_activated) THEN
189 nblr_orig = keep(420)
190 ELSE
191 nblr_orig = -9999
192 ENDIF
193 IF ((keep(114).EQ.1) .AND.
194 & (keep(116).GT.0) .AND. ((nfront-nass-keep(253)).GT.0)
195 & ) THEN
196 nslaves = iw(ioldps+5+xsize)
197 irow_l = ioldps+6+xsize+nslaves+nass
199 & n,
200 & nfront-nass-keep(253),
201 & keep(116),
202 & iw(irow_l), perm,
203 & nvschur )
204 ELSE
205 nvschur = 0
206 ENDIF
207 IF (lr_activated) THEN
208 k263 = 1
209 ELSE
210 k263 = keep(263)
211 IF (k263 .NE. 0 .AND. nass/nblr_orig < 4) THEN
212 IF ( nblr_orig .GT. nbkjib_orig * 4 ) THEN
213 nblr_orig =
max(nbkjib_orig, (nass+3)/4)
214 ELSE
215 k263 = 0
216 ENDIF
217 ENDIF
218 ENDIF
219 pivot_option = keep(468)
220 IF ( uutemp == 0.0e0 .AND.
221 & .NOT.(
222 & ooc_effective_on_front
223 & )
224 & ) THEN
225 IF (k263.EQ.1.AND.(.NOT.lr_activated)) THEN
226 pivot_option = 0
227 ENDIF
228 ENDIF
229 iend_block = 0
230 iend_blr = 0
231 current_blr = 0
232 ALLOCATE( ipiv( nass ), stat = allocok )
233 IF ( allocok .GT. 0 ) THEN
234 WRITE(*,*) myid,' : CMUMPS_FAC2_LU :failed to allocate ',
235 & nass, ' integers'
236 iflag = -13
237 ierror =nass
238 GO TO 500
239 END IF
241 liwfac = iw(ioldps+xxi)
242 IF ( ooc_effective_on_front ) THEN
243 lnextpiv2bewritten = 1
244 unextpiv2bewritten = 1
245 pp_first2swap_l = lnextpiv2bewritten
246 pp_first2swap_u = unextpiv2bewritten
247 monbloc%LastPanelWritten_L = 0
248 monbloc%LastPanelWritten_U = 0
249 monbloc%INODE = inode
250 monbloc%MASTER = .true.
251 monbloc%Typenode = 2
252 monbloc%NROW = nass
253 monbloc%NCOL = nfront
254 monbloc%NFS = nass
255 monbloc%Last = .false.
256 monbloc%LastPiv = -68877
257 NULLIFY(monbloc%INDICES)
258 ENDIF
259 IF (lr_activated) THEN
260 pivot_option = 4
261 IF (keep(475).EQ.1) THEN
262 pivot_option = 3
263 ELSEIF (keep(475).EQ.2) THEN
264 pivot_option = 2
265 ELSEIF (keep(475).EQ.3) THEN
266 IF (uutemp == 0.0e0) THEN
267 pivot_option = 0
268 ELSE
269 pivot_option = 1
270 ENDIF
271 ENDIF
273 ENDIF
274 hf = 6 + iw(ioldps+5+xsize)+xsize
275 ooc_eff_and_write_bypanel = ( (pivot_option.GE.3) .AND.
276 & ooc_effective_on_front )
277 IF (lr_activated) THEN
278 CALL get_cut(iw(ioldps+hf:ioldps+hf+nfront-1), nass,
279 & nfront-nass, lrgroups, npartscb,
280 & npartsass, begs_blr)
281 CALL regrouping2(begs_blr, npartsass, nass, npartscb,
282 & nfront-nass, keep(488), .false., keep(472))
283 nb_blr = npartsass + npartscb
285 maxi_rank = keep(479)*maxi_cluster
286 lwork = maxi_cluster*maxi_cluster
287 omp_num = 1
288#if defined(BLR_MT)
289
290#endif
291 ALLOCATE(block(maxi_cluster, omp_num*maxi_cluster),
292 & rwork(2*maxi_cluster*omp_num),
293 & tau(maxi_cluster*omp_num),
294 & jpvt(maxi_cluster*omp_num),
295 & work(lwork*omp_num),stat=allocok)
296 IF (allocok > 0) THEN
297 iflag = -13
298 ierror = omp_num*(lwork + maxi_cluster*(maxi_cluster+4))
299 GOTO 480
300 ENDIF
301 ALLOCATE(acc_lua(omp_num),stat=allocok)
302 IF (allocok > 0) THEN
303 iflag = -13
304 ierror = omp_num
305 GOTO 480
306 ENDIF
307 IF (keep(480).GE.3) THEN
308 DO my_num=1,omp_num
309 CALL alloc_lrb(acc_lua(my_num), maxi_rank,
310 & maxi_cluster, maxi_cluster, .true.,
311 & iflag, ierror, keep8)
312 IF (iflag.LT.0) GOTO 500
313 acc_lua(my_num)%K = 0
314 ENDDO
315 ENDIF
316 ENDIF
317 IF (lr_activated.AND.
318 & (keep(480).NE.0
319 & .OR.
320 & (
321 & (keep(486).EQ.2)
322 & )
323 & )
324 & ) THEN
325 info_tmp(1) = iflag
326 info_tmp(2) = ierror
328 iflag = info_tmp(1)
329 ierror = info_tmp(2)
330 IF (iflag.LT.0) GOTO 500
332 & .false.,
333 & .true.,
334 & .false.,
335 & npartsass,
336 & begs_blr, ptdummy,
337 & huge(npartsass),
338 & info_tmp)
339 iflag = info_tmp(1)
340 ierror = info_tmp(2)
341 IF (iflag.LT.0) GOTO 500
342 ENDIF
343 lastbl = .false.
344 DO WHILE (iend_blr < nass )
345 current_blr = current_blr + 1
346 ibeg_blr = iw(ioldps+1+keep(ixsz)) + 1
347 IF (.NOT. lr_activated)THEN
348 iend_blr =
min(iend_blr + nblr_orig, nass)
349 ELSE
350 iend_blr = begs_blr(current_blr+1)-1
351 begs_blr( current_blr ) = ibeg_blr
352 IF ( iend_blr - ibeg_blr + 1 .GT. maxi_cluster ) THEN
353 maxi_cluster = iend_blr - ibeg_blr + 1
354 lwork = maxi_cluster*maxi_cluster
355 DEALLOCATE(block, work, rwork, tau, jpvt)
356 ALLOCATE(block(maxi_cluster, omp_num*maxi_cluster),
357 & rwork(2*maxi_cluster*omp_num),
358 & tau(maxi_cluster*omp_num),
359 & jpvt(maxi_cluster*omp_num),
360 & work(lwork*omp_num),stat=allocok)
361 IF (allocok > 0) THEN
362 iflag = -13
363 ierror = omp_num*(lwork + maxi_cluster*(maxi_cluster+4))
364 GOTO 500
365 ENDIF
366 IF (keep(480).GE.3) THEN
367 DO my_num=1,omp_num
369 CALL alloc_lrb(acc_lua(my_num), maxi_rank,
370 & maxi_cluster, maxi_cluster, .true.,
371 & iflag, ierror, keep8)
372 IF (iflag.LT.0) GOTO 500
373 acc_lua(my_num)%K = 0
374 ENDDO
375 ENDIF
376 ENDIF
377 ENDIF
378 DO WHILE (iend_block < iend_blr )
379 ibeg_block = iw(ioldps+1+keep(ixsz)) + 1
380 IF (keep(405).EQ.0) THEN
381 keep(425)=
max(keep(425),iend_block-ibeg_block)
382 ELSE
383
384 keep(425)=
max(keep(425),iend_block-ibeg_block)
385
386 ENDIF
387 iend_block =
min(iend_block + nbkjib_orig, iend_blr)
388 50 CONTINUE
389 IF (k263.EQ.0) THEN
390 ibeg_block_for_ipiv = ibeg_block
391 ELSE
392 ibeg_block_for_ipiv = ibeg_blr
393 ENDIF
395 & ibeg_block_for_ipiv,iend_block,n,inode,
396 & iw,liw,a,la,inopv,noffw,nbtinyw,
397 & det_expw, det_mantw, det_signw,
398 & iflag,ioldps,poselt,uu,seuil_loc,keep,keep8,
399 & dkeep(1),pivnul_list(1),lpn_list,
400 & pp_first2swap_l, monbloc%LastPanelWritten_L,
401 & pp_lastpivrptrfilled_l,
402 & pp_first2swap_u, monbloc%LastPanelWritten_U,
403 & pp_lastpivrptrfilled_u,
404 & pivot_option, lr_activated, iend_blr,
405 & inextpiv, ooc_effective_on_front,
406 & nvschur, parpiv_t1,
407 & tipiv=ipiv
408 & )
409 IF (iflag.LT.0) GOTO 500
410 IF (inopv.EQ.1) THEN
411 IF (staticmode) THEN
412 inopv = -1
413 GOTO 50
414 ENDIF
415 lastbl = .true.
416 ELSE IF (inopv .LE. 0) THEN
417 inopv = 0
418 IF (pivot_option.GE.3) THEN
419 last_col = nfront
420 ELSEIF (pivot_option.EQ.2) THEN
421 last_col = nass
422 ELSE
423 last_col = iend_blr
424 ENDIF
426 & nfront, nass, iw(ioldps+1+xsize),
427 & last_col, a, la, poselt, ifinb,
428 & lr_activated)
429 iw(ioldps+1+xsize) = iw(ioldps+1+xsize) + 1
430 npvw = npvw + 1
431 IF (ifinb.EQ.0) THEN
432 GOTO 50
433 ELSE IF (ifinb .EQ. -1) THEN
434 lastbl = .true.
435 ENDIF
436 ENDIF
437 npiv = iw(ioldps+1+xsize)
438 IF (k263.EQ.0) THEN
439 nelim = iend_blr - npiv
441 & n, inode, fpere, iw, liw, ioldps, poselt, a, la,
442 & nfront, ibeg_block, npiv, ipiv, nass,lastbl, idummy,
443 & comm, myid, bufr, lbufr, lbufr_bytes,nbfin,leaf,
444 & iflag, ierror, ipool,lpool,
445 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
446 & lrlus,
comp, ptrist, ptrast, ptlust_s, ptrfac, step,
447 & pimaster, pamaster, nstk_s,perm,procnode_steps,
448 & root, opassw, opeliw, itloc, rhs_mumps,
449 & fils, dad, ptrarw, ptraiw, intarr,dblarr,
450 & icntl,keep,keep8,
451 & dkeep,nd,frere, lptrar, nelt, frtptr, frtelt,
452 & istep_to_iniv2, tab_pos_in_pere
453 & , nelim, .false.
454 & , npartsass, current_blr
455 & , blr_dummy, lrgroups
456 & )
457 END IF
458 IF ( iflag .LT. 0 ) GOTO 500
459 IF ( ooc_eff_and_write_bypanel ) THEN
460 monbloc%LastPiv= iw(ioldps+1+xsize)
461 strat = strat_try_write
462 last_call = .false.
464 & ( strat, typef_u,
465 & a(poselt), lafac, monbloc,
466 & lnextpiv2bewritten, unextpiv2bewritten,
467 & iw(ioldps), liwfac,
468 & myid, keep8(31), iflag_ooc,last_call )
469 IF (iflag_ooc < 0 ) THEN
470 iflag=iflag_ooc
471 GOTO 500
472 ENDIF
473 ENDIF
474 npiv = iw(ioldps+1+xsize)
475 IF ( iend_blr .GT. iend_block ) THEN
477 IF (pivot_option.GE.3) THEN
478 last_col = nfront
479 ELSEIF (pivot_option.EQ.2) THEN
480 last_col = nass
481 ELSE
482 last_col = iend_blr
483 ENDIF
485 & npiv, nfront, iend_blr, last_col,
486 & a, la, poselt,
487 & -77777,
488 & .true., .false., .true.,
489 & .false.,
490 & lr_activated)
491 ENDIF
493 END DO
494 npiv = iw(ioldps+1+xsize)
495 IF (lr_activated) THEN
496 ALLOCATE(blr_u(nb_blr-current_blr),stat=allocok)
497 IF (allocok > 0) THEN
498 iflag = -13
499 ierror = nb_blr-current_blr
500 GOTO 500
501 ENDIF
502 ALLOCATE(blr_l(npartsass-current_blr),stat=allocok)
503 IF (allocok > 0) THEN
504 iflag = -13
505 ierror = npartsass-current_blr
506 GOTO 500
507 ENDIF
508 nelim = iend_blr - npiv
509 IF (nelim .EQ. iend_blr - ibeg_blr + 1) THEN
510 IF (keep(480).GE.2
511 & .OR.
512 & (
513 & (keep(486).EQ.2)
514 & )
515 & ) THEN
516 DO j=1,nb_blr-current_blr
517 blr_u(j)%M=0
518 blr_u(j)%N=0
519 blr_u(j)%K=0
520 blr_u(j)%ISLR=.false.
521 NULLIFY(blr_u(j)%Q)
522 NULLIFY(blr_u(j)%R)
523 ENDDO
525 & iw(ioldps+xxf),
526 & 1,
527 & current_blr, blr_u)
528 DO j=1,npartsass-current_blr
529 blr_l(j)%M=0
530 blr_l(j)%N=0
531 blr_l(j)%K=0
532 blr_l(j)%ISLR=.false.
533 NULLIFY(blr_l(j)%Q)
534 NULLIFY(blr_l(j)%R)
535 ENDDO
537 & iw(ioldps+xxf),
538 & 0,
539 & current_blr, blr_l)
540 NULLIFY(blr_l)
541 NULLIFY(blr_u)
542 ENDIF
543 GOTO 101
544 ENDIF
545 end_i=nb_blr
546#if defined(BLR_MT)
547
548#endif
550 & nfront,
551 & begs_blr, nb_blr, dkeep(8), keep(466), keep(473), blr_u,
552 & current_blr,
553 & 'H', work, tau, jpvt, lwork, rwork,
554 & block, maxi_cluster, nelim,
555 & .false., 0, 0, 2, keep(483), keep8,
556 & end_i_in=end_i
557 & )
558 IF (iflag.LT.0) GOTO 300
559 IF ((keep(480).NE.0.AND.nb_blr.GT.current_blr)
560 & .OR.
561 & (
562 & (keep(486).EQ.2)
563 & )
564 & ) THEN
565 IF (keep(480).LT.5) THEN
567 & iw(ioldps+xxf),
568 & 1,
569 & current_blr, blr_u)
570 ENDIF
571 ENDIF
572#if defined(BLR_MT)
573
574#endif
575 IF (pivot_option.LT.3) THEN
576 IF (pivot_option.LT.2) THEN
577 first_block = current_blr+1
578 ELSE
579 first_block = npartsass+1
580 ENDIF
581 last_block=nb_blr
583 & ibeg_blr,
584 & nb_blr, blr_u, current_blr,
585 & first_block, last_block, 2, 0, 1,
586 & .false.)
587 ENDIF
588 300 CONTINUE
589#if defined(BLR_MT)
590
591#endif
592 ENDIF
593 101 CONTINUE
594 IF (lr_activated .OR. (k263.NE.0.AND.pivot_option.GE.3)) THEN
595 nelim = iend_blr - npiv
596 blr_send=>blr_dummy
597 IF (associated(blr_u)) THEN
598 blr_send=>blr_u
599 ENDIF
601 & n, inode, fpere, iw, liw, ioldps, poselt, a, la, nfront,
602 & ibeg_blr, npiv, ipiv, nass,lastbl, idummy,
603 & comm, myid, bufr, lbufr, lbufr_bytes,nbfin,leaf,
604 & iflag, ierror, ipool,lpool,
605 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
606 & lrlus,
comp, ptrist, ptrast, ptlust_s, ptrfac, step,
607 & pimaster, pamaster, nstk_s,perm,procnode_steps,
608 & root, opassw, opeliw, itloc, rhs_mumps,
609 & fils, dad, ptrarw, ptraiw,
610 & intarr,dblarr,icntl,keep,keep8,dkeep,nd,frere,
611 & lptrar, nelt, frtptr, frtelt,
612 & istep_to_iniv2, tab_pos_in_pere
613 & , nelim, lr_activated
614 & , npartsass, current_blr
615 & , blr_send, lrgroups
616 & )
617 ENDIF
618 IF (.NOT. lr_activated) THEN
619 last_col = nfront
620 IF (pivot_option.EQ.2) THEN
621 first_col = nass
622 ELSE
623 first_col = npiv
624 ENDIF
625 IF (iend_blr.LT.nass .OR. pivot_option.LT.3) THEN
627 & npiv, nfront, nass, last_col,
628 & a, la, poselt, first_col, .true., (pivot_option.LT.3),
629 & .true., (keep(377).EQ.1),
630 & lr_activated)
631 ENDIF
632 IF (k263.NE.0 .AND. pivot_option.LT.3) THEN
633 nelim = iend_blr - npiv
634 blr_send=>blr_dummy
635 IF (associated(blr_u)) THEN
636 blr_send=>blr_u
637 ENDIF
639 & n, inode, fpere, iw, liw, ioldps, poselt, a, la,
640 & nfront, ibeg_blr, npiv, ipiv, nass,lastbl, idummy,
641 & comm, myid, bufr, lbufr, lbufr_bytes,nbfin,leaf,
642 & iflag, ierror, ipool,lpool,
643 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
644 & lrlus,
comp, ptrist, ptrast, ptlust_s, ptrfac, step,
645 & pimaster, pamaster, nstk_s,perm,procnode_steps,
646 & root, opassw, opeliw, itloc, rhs_mumps,
647 & fils, dad, ptrarw, ptraiw,
648 & intarr,dblarr,icntl,keep,keep8,dkeep,nd,frere,
649 & lptrar, nelt, frtptr, frtelt,
650 & istep_to_iniv2, tab_pos_in_pere
651 & , nelim, lr_activated
652 & , npartsass, current_blr
653 & , blr_send, lrgroups
654 & )
655 ENDIF
656 ELSE
657 nelim = iend_blr - npiv
658 IF (nelim .EQ. iend_blr - ibeg_blr + 1) THEN
659 IF (keep(480).GE.2) THEN
660 IF (iend_blr.LT.nass) THEN
661#if defined(BLR_MT)
662
663#endif
665 & nfront, iw(ioldps+xxf), 0,
666 & begs_blr, begs_blr, current_blr, acc_lua,
667 & nb_blr, npartsass, nelim,
668 & 2, 0,
669 & .false., iflag, ierror, 0,
670 & keep(481), dkeep(11), keep(466), keep(477),
671 & keep(480), keep(479), keep(478), keep(476),
672 & keep(483), maxi_cluster, maxi_rank,
673 & keep(474), 0, blr_u, keep8
674 & )
675 IF (iflag.LT.0) GOTO 600
677 & nfront, iw(ioldps+xxf), 1,
678 & begs_blr, begs_blr, current_blr, acc_lua,
679 & nb_blr, npartsass, nelim,
680 & 2, 0,
681 & .false., iflag, ierror, 0,
682 & keep(481), dkeep(11), keep(466), keep(477),
683 & keep(480), keep(479), keep(478), keep(476),
684 & keep(483), maxi_cluster, maxi_rank,
685 & keep(474), 0, blr_u, keep8,
686 & end_i_in=end_i
687 & )
688 600 CONTINUE
689#if defined(BLR_MT)
690
691#endif
692 IF (iflag.LT.0) GOTO 500
693 ENDIF
694 ENDIF
695 IF (keep(486).EQ.3) THEN
696 IF (keep(480).EQ.0) THEN
697 DEALLOCATE(blr_u,blr_l)
698 NULLIFY(blr_l)
699 NULLIFY(blr_u)
700 ENDIF
701 ENDIF
702 GOTO 100
703 ENDIF
704 IF (keep(475).EQ.0) THEN
705 IF (iend_blr.LT.nfront) THEN
707 & npiv, nfront, nass,
708 & -77777,
709 & a, la, poselt,
710 & -77777,
711 & .true., .false., .false.,
712 & .false.,
713 & lr_activated)
714 ENDIF
715 ENDIF
716#if defined(BLR_MT)
717
718#endif
720 & nfront,
721 & begs_blr, npartsass, dkeep(8), keep(466), keep(473),
722 & blr_l,
723 & current_blr, 'V', work, tau, jpvt, lwork, rwork,
724 & block, maxi_cluster, nelim,
725 & .false., 0, 0,
726 & 2, keep(483), keep8
727 & )
728#if defined(BLR_MT)
729
730#endif
731 IF ((keep(480).NE.0.AND.nb_blr.GT.current_blr)
732 & .OR.
733 & (
734 & (keep(486).EQ.2)
735 & )
736 & ) THEN
737 IF (keep(480).LT.5) THEN
739 & iw(ioldps+xxf),
740 & 0,
741 & current_blr, blr_l)
742 ENDIF
743 ENDIF
744#if defined(BLR_MT)
745
746
747#endif
748 IF (iflag.LT.0) GOTO 400
749 IF (keep(475).GT.0) THEN
751 & ibeg_blr,
752 & npartsass, blr_l, current_blr, current_blr+1,
753 & npartsass, 2, 0, 0, .false.)
754#if defined(BLR_MT)
755
756#endif
757 ENDIF
758 IF (keep(480).GE.2) THEN
759 upos = poselt+int(begs_blr(current_blr)-1,8)*int(nfront,8)
760 & +int(begs_blr(current_blr+1)-nelim-1,8)
761 lpos = poselt+int(begs_blr(current_blr+1)-1,8)*int(nfront,8)
762 & +int(begs_blr(current_blr+1)-nelim-1,8)
764 & iflag, ierror, nfront, nfront,
765 & begs_blr, current_blr, blr_l, npartsass,
766 & current_blr+1, nelim, 'N')
767 IF (iflag.LT.0) GOTO 444
768 IF (iend_blr.LT.nass) THEN
770 & nfront, iw(ioldps+xxf), 0,
771 & begs_blr, begs_blr, current_blr, acc_lua,
772 & nb_blr, npartsass, nelim,
773 & 2, 0,
774 & .false., iflag, ierror, 0,
775 & keep(481), dkeep(11), keep(466), keep(477),
776 & keep(480), keep(479), keep(478), keep(476),
777 & keep(483), maxi_cluster, maxi_rank,
778 & keep(474), 0, blr_u, keep8
779 & )
780 IF (iflag.LT.0) GOTO 442
782 & nfront, iw(ioldps+xxf), 1,
783 & begs_blr, begs_blr, current_blr, acc_lua,
784 & nb_blr, npartsass, nelim,
785 & 2, 0,
786 & .false., iflag, ierror, 0,
787 & keep(481), dkeep(11), keep(466), keep(477),
788 & keep(480), keep(479), keep(478), keep(476),
789 & keep(483), maxi_cluster, maxi_rank,
790 & keep(474), 0, blr_u, keep8,
791 & end_i_in=end_i
792 & )
793 442 CONTINUE
794 ENDIF
795 444 CONTINUE
796 ELSE
798 & iflag, ierror, nfront,
799 & begs_blr, begs_blr, current_blr, blr_l, npartsass,
800 & blr_u, nb_blr, nelim, .false., 0,
801 & 2, 0,
802 & keep(481), dkeep(11), keep(466), keep(477)
803 & )
804 ENDIF
805#if defined(BLR_MT)
806
807#endif
808 IF (iflag.LT.0) GOTO 400
809 IF (keep(475).GT.0) THEN
810 first_block = current_blr+1
811 IF (keep(486).EQ.2.AND.uu.EQ.0) THEN
812 last_block = current_blr
813 ELSE
814 last_block = npartsass
815 ENDIF
817 & nfront, .true.,
818 & begs_blr(current_blr),
819 & begs_blr(current_blr+1), npartsass, blr_l, current_blr, 'V',
820 & 1,
821 & beg_i_in=first_block, end_i_in=last_block)
822#if defined(BLR_MT)
823#endif
824 ENDIF
825 IF (keep(475).GE.2) THEN
826 IF (keep(475).EQ.2) THEN
827 first_block = npartsass+1
828 ELSE
829 first_block = current_blr+1
830 ENDIF
831 IF (keep(486).NE.2) THEN
832 last_block = end_i
833 ELSEIF(uu.GT.0) THEN
834 last_block = npartsass
835 ELSE
836 last_block = current_blr
837 ENDIF
839 & nfront, .true.,
840 & begs_blr(current_blr),
841 & begs_blr(current_blr+1), nb_blr, blr_u, current_blr, 'H',
842 & 1,
843 & beg_i_in=first_block, end_i_in=last_block)
844 ENDIF
845 400 CONTINUE
846#if defined(BLR_MT)
847
848#endif
849 IF (iflag.LT.0) GOTO 500
850 IF (keep(486).EQ.3) THEN
851 IF (keep(480).EQ.0.OR.nb_blr.EQ.current_blr) THEN
853 & keep8, keep(34))
855 & keep8, keep(34))
856 DEALLOCATE(blr_u,blr_l)
857 ENDIF
858 ENDIF
859 NULLIFY(blr_l)
860 NULLIFY(blr_u)
861 ENDIF
862 IF ( ooc_effective_on_front ) THEN
863 strat = strat_try_write
864 monbloc%LastPiv = npiv
865 last_call= .false.
868 & a(poselt), lafac, monbloc,
869 & lnextpiv2bewritten, unextpiv2bewritten,
870 & iw(ioldps), liwfac,
871 & myid, keep8(31), iflag_ooc,last_call )
872 IF (iflag_ooc < 0 ) THEN
873 iflag=iflag_ooc
874 GOTO 500
875 ENDIF
876 ENDIF
877 100 CONTINUE
878 END DO
879 IF (lr_activated) THEN
880 ibeg_blr = iw(ioldps+1+xsize) + 1
881 begs_blr( current_blr + 1 ) = ibeg_blr
882 IF ( (keep(486).EQ.2)
883 & ) THEN
885 & begs_blr_static)
886 IF (uu.GT.0) THEN
887 allocate(begs_blr_tmp(nb_blr+1),stat=allocok)
888 IF (allocok > 0) THEN
889 iflag = -13
890 ierror = nb_blr+1
891 GOTO 500
892 ENDIF
893 DO ip=1,nb_blr+1
894 begs_blr_tmp(ip) = begs_blr_static(ip)
895 ENDDO
896 ENDIF
897 ENDIF
898 IF (
899 & (keep(486).EQ.2)
900 & ) THEN
901 mem_tot = 0
902#if defined(BLR_MT)
903
904
905#endif
906#if defined(BLR_MT)
907
908
909
910#endif
911 DO ip=1,npartsass
912 IF (iflag.LT.0) cycle
913 diagsiz_dyn = begs_blr(ip+1)-begs_blr(ip)
914 diagsiz_sta = begs_blr_static(ip+1)-begs_blr(ip)
915 mem = diagsiz_dyn*(2*diagsiz_sta-diagsiz_dyn)
916 mem_tot = mem_tot + mem
917 ALLOCATE(diag(mem), stat=allocok)
918 IF (allocok > 0) THEN
919 iflag = -13
920 ierror = mem
921 cycle
922 ENDIF
923 dpos = 1
924 poselt_diag = poselt + int(begs_blr(ip)-1,8)*int(nfront,8)
925 & + int(begs_blr(ip)-1,8)
926 DO i=1,diagsiz_sta
927 IF (i.LE.diagsiz_dyn) THEN
928 diag(dpos:dpos+diagsiz_sta-1) =
929 & a(poselt_diag:poselt_diag+int(diagsiz_sta-1,8))
930 dpos = dpos + diagsiz_sta
931 ELSE
932 diag(dpos:dpos+diagsiz_dyn-1) =
933 & a(poselt_diag:poselt_diag+int(diagsiz_dyn-1,8))
934 dpos = dpos + diagsiz_dyn
935 ENDIF
936 poselt_diag = poselt_diag + int(nfront,8)
937 ENDDO
939 & iw(ioldps+xxf),
940 & ip, diag)
941 ENDDO
942#if defined(BLR_MT)
943
944
945#endif
947 & .false., keep8, iflag, ierror, .true., .true.)
948#if defined(BLR_MT)
949
950#endif
951 IF (iflag.LT.0) GOTO 460
952 IF (uu.GT.0) THEN
953 DO ip=1,npartsass
954 nelim = begs_blr_tmp(ip+1)-begs_blr(ip+1)
955 DO loru=0,1
956#if defined(BLR_MT)
957
958#endif
960 & iw(ioldps+xxf), loru, ip, blr_panel)
962 & keep(34))
963#if defined(BLR_MT)
964
965#endif
966 IF (loru.EQ.0) THEN
967 dir = 'V'
968 ELSE
969 dir = 'H'
970 ENDIF
972 & ierror, nfront, begs_blr_tmp,
973 & nb_blr, dkeep(8), keep(466), keep(473),
974 & blr_panel, ip,
975 & dir, work, tau, jpvt, lwork, rwork,
976 & block, maxi_cluster, nelim,
977 & .false., 0, 0,
978 & 2, keep(483), keep8,
979 & end_i_in=npartsass, frswap=.true.
980 & )
981#if defined(BLR_MT)
982
983#endif
984 IF (iflag.LT.0) GOTO 440
985 ENDDO
986#if defined(BLR_MT)
987
988
989#endif
990 begs_blr_tmp(ip+1) = begs_blr(ip+1)
991#if defined(BLR_MT)
992
993#endif
994 ENDDO
995#if defined(BLR_MT)
996
997#endif
998 440 CONTINUE
999 ENDIF
1000 460 CONTINUE
1001#if defined(BLR_MT)
1002
1003#endif
1004 IF (uu.GT.0) THEN
1005 deallocate(begs_blr_tmp)
1006 ENDIF
1007 ENDIF
1008 IF (iflag.LT.0) GOTO 500
1009 IF ( (keep(486).EQ.2)
1010 & ) THEN
1012 & begs_blr)
1013 ENDIF
1014 IF (iflag.GE.0) THEN
1016 DO ip=1,npartsass
1018 & iw(ioldps+xxf), 0, ip, blr_panel)
1020 & )
1022 & iw(ioldps+xxf), 1, ip, blr_panel)
1024 & )
1025 ENDDO
1027 ENDIF
1028 ENDIF
1029 IF (keep(486).NE.0) THEN
1030 IF (.NOT.lr_activated) THEN
1032 ENDIF
1033 ENDIF
1034 IF (iflag.LT.0) GOTO 500
1035 IF ( ooc_effective_on_front ) THEN
1036 strat = strat_write_max
1037 monbloc%Last = .true.
1038 monbloc%LastPiv = iw(ioldps+1+xsize)
1039 last_call = .true.
1042 & a(poselt), lafac, monbloc,
1043 & lnextpiv2bewritten, unextpiv2bewritten,
1044 & iw(ioldps), liwfac,
1045 & myid, keep8(31), iflag_ooc, last_call )
1046 IF (iflag_ooc < 0 ) THEN
1047 iflag=iflag_ooc
1048 GOTO 500
1049 ENDIF
1051 & ioldps, iw, liw, monbloc , nfront, keep)
1052 ENDIF
1053 GOTO 700
1054 480 CONTINUE
1055 500 CONTINUE
1057 700 CONTINUE
1058 IF (lr_activated) THEN
1059 IF (allocated(rwork)) DEALLOCATE(rwork)
1060 IF (allocated(work)) DEALLOCATE(work)
1061 IF (allocated(tau)) DEALLOCATE(tau)
1062 IF (allocated(jpvt)) DEALLOCATE(jpvt)
1063 IF (allocated(block)) DEALLOCATE(block)
1064 IF (associated(acc_lua)) THEN
1065 IF (keep(480).GE.3) THEN
1066 DO my_num=1,omp_num
1067 CALL dealloc_lrb(acc_lua(my_num), keep8, keep(34))
1068 ENDDO
1069 ENDIF
1070 DEALLOCATE(acc_lua)
1071 ENDIF
1072 IF (associated(begs_blr)) THEN
1073 DEALLOCATE(begs_blr)
1074 NULLIFY(begs_blr)
1075 ENDIF
1076 ENDIF
1077 IF (lr_activated.AND.keep(480).NE.0) THEN
1078 IF (.NOT.
1079 & (
1080 & (keep(486).EQ.2)
1081 & )
1082 & )
1083 & THEN
1085 & keep8, keep(34))
1086 ENDIF
1087 ENDIF
1088 IF (lr_activated) THEN
1089 IF (.NOT.
1090 & (
1091 & (keep(486).EQ.2)
1092 & )
1093 & ) THEN
1095 & keep(34))
1096 ENDIF
1097 ENDIF
1098 DEALLOCATE( ipiv )
1099 RETURN
subroutine cmumps_bdc_error(myid, slavef, comm, keep)
subroutine cmumps_ooc_pp_tryrelease_space(iwpos, ioldps, iw, liw, monbloc, nfront, keep)
subroutine get_cut(iwr, nass, ncb, lrgroups, npartscb, npartsass, cut)
subroutine, public cmumps_buf_test()
subroutine cmumps_get_size_schur_in_front(n, ncb, size_schur, row_indices, perm, nvschur)
subroutine cmumps_fac_sq(ibeg_block, iend_block, npiv, nfront, last_row, last_col, a, la, poselt, first_col, call_ltrsm, call_utrsm, call_gemm, with_comm_thread, lr_activated)
subroutine cmumps_fac_i(nfront, nass, last_row, ibeg_block, iend_block, n, inode, iw, liw, a, la, inopv, noffw, nbtinyw, det_expw, det_mantw, det_signw, iflag, ioldps, poselt, uu, seuil, keep, keep8, dkeep, pivnul_list, lpn_list pp_first2swap_l, pp_lastpanelondisk_l, pp_lastpivrptrfilled_l, pp_first2swap_u, pp_lastpanelondisk_u, pp_lastpivrptrfilled_u, pivot_option, lr_activated, iend_blr, inextpiv, ooc_effective_on_front, nvschur, parpiv_t1, tipiv)
subroutine cmumps_fac_mq(ibeg_block, iend_block, nfront, nass, npiv, last_col, a, la, poselt, ifinb, lr_activated)
subroutine cmumps_send_factored_blk(comm_load, ass_irecv, n, inode, fpere, iw, liw, ioldps, poselt, a, la, lda_fs, ibeg_block, iend, tipiv, lpiv, lastbl, nb_bloc_fac, comm, myid, bufr, lbufr, lbufr_bytes, nbfin, leaf, iflag, ierror, ipool, lpool, slavef, posfac, iwpos, iwposcb, iptrlu, lrlu, lrlus, comp, ptrist, ptrast, ptlust_s, ptrfac, step, pimaster, pamaster, nstk_s, perm, procnode_steps, root, opassw, opeliw, itloc, rhs_mumps, fils, dad, ptrarw, ptraiw, intarr, dblarr, icntl, keep, keep8, dkeep, nd, frere, lptrar, nelt, frtptr, frtelt, istep_to_iniv2, tab_pos_in_pere, nelim, lr_activated, npartsass, current_blr_panel, blr_loru, lrgroups)
subroutine cmumps_blr_upd_panel_left(a, la, poselt, nfront, iwhandler, loru, begs_blr, begs_blr_u, current_blr, acc_lua, nb_blr, npartsass, nelim, niv, sym, lbandslave, iflag, ierror, ishift, midblk_compress, toleps, tol_opt, kpercent_rmb, k480, k479, k478, kpercent_lua, kpercent, maxi_cluster, maxi_rank, k474, fsorcb, blr_u_col, keep8, first_block, beg_i_in, end_i_in)
subroutine cmumps_blr_panel_lrtrsm(a, la, poselt, nfront, ibeg_block, nb_blr, blr_loru, current_blr, first_block, last_block, niv, sym, loru, lbandslave, iw, offset_iw, nass)
subroutine cmumps_blr_upd_nelim_var_l(a_u, la_u, upos, a_l, la_l, lpos, iflag, ierror, ldu, ldl, begs_blr_l, current_blr, blr_l, nb_blr_l, first_block, nelim, utrans)
subroutine cmumps_blr_update_trailing(a, la, poselt, iflag, ierror, nfront, begs_blr_l, begs_blr_u, current_blr, blr_l, nb_blr_l, blr_u, nb_blr_u, nelim, lbandslave, ishift, niv, sym, midblk_compress, toleps, tol_opt, kpercent)
subroutine cmumps_compress_panel(a, la, poselt, iflag, ierror, nfront, begs_blr, nb_blr, toleps, tol_opt, k473, blr_panel, current_blr, dir, work, tau, jpvt, lwork, rwork, block, maxi_cluster, nelim, lbandslave, npiv, ishift, niv, kpercent, keep8, k480, beg_i_in, end_i_in, frswap)
subroutine cmumps_decompress_panel(a, la, poselt, lda11, lda21, copy_dense_blocks, begs_blr_diag, begs_blr_first_offdiag, nb_blr, blr_panel, current_blr, dir, decomp_timer, beg_i_in, end_i_in, only_nelim_in, cbasm_tofix_in)
subroutine max_cluster(cut, cut_size, maxi_cluster)
subroutine alloc_lrb(lrb_out, k, m, n, islr, iflag, ierror, keep8)
subroutine regrouping2(cut, npartsass, nass, npartscb, ncb, ibcksz, onlycb, k472)
subroutine, public cmumps_blr_save_init(iwhandler, issym, ist2, isslave, nb_panels, begs_blr_l, begs_blr_col, nb_accesses_init, info)
subroutine, public cmumps_blr_save_begs_blr_dyn(iwhandler, begs_blr_dynamic)
subroutine, public cmumps_blr_init_front(iwhandler, info, mtk405)
subroutine, public cmumps_blr_save_diag_block(iwhandler, ipanel, d)
subroutine, public cmumps_blr_save_panel_loru(iwhandler, loru, ipanel, lrb_panel)
subroutine, public cmumps_blr_retrieve_panel_loru(iwhandler, loru, ipanel, thelrbpanel)
subroutine, public cmumps_blr_retrieve_begsblr_sta(iwhandler, begs_blr_static)
subroutine, public cmumps_blr_end_front(iwhandler, info1, keep8, k34, lrsolve_act_opt, mtk405)
subroutine, public cmumps_blr_free_all_panels(iwhandler, loru, keep8, k34)
subroutine upd_flop_facto_fr(nfront, nass, npiv, sym, niv)
subroutine upd_mry_lu_fr(nass, ncb, sym, nelim)
subroutine upd_mry_lu_lrgain(blr_panel, nbblocks)
subroutine upd_flop_frfronts(nfront, npiv, nass, sym, niv)
subroutine dealloc_blr_panel(blr_panel, iend, keep8, k34, ibeg_in)
subroutine dealloc_lrb(lrb_out, keep8, k34)
subroutine, public cmumps_ooc_io_lu_panel(strat, typefile, afac, lafac, monbloc, lnextpiv2bewritten, unextpiv2bewritten, iw, liwfac, myid, filesize, ierr, last_call)
integer, parameter, public typef_both_lu