17 & N, INODE, IW, LIW, A, LA, INFO, ND,
18 & FILS, FRERE, DAD, MAXFRW, root,
19 & OPASSW, OPELIW, PTRIST, PTLUST, PTRFAC, PTRAST,
20 & STEP, PIMASTER, PAMASTER,PTRARW,
21 & PTRAIW, ITLOC, RHS_MUMPS, NSTEPS, SON_LEVEL2,
22 & COMP, LRLU, IPTRLU, IWPOS, IWPOSCB, POSFAC, LRLUS, LRLUSM,
23 & ICNTL, KEEP,KEEP8,DKEEP,INTARR,LINTARR,DBLARR,LDBLARR,
25 & NSTK_S,PROCNODE_STEPS, SLAVEF, COMM,MYID,
26 & BUFR, LBUFR, LBUFR_BYTES, NBFIN, IPOOL, LPOOL, LEAF,
28 & ISTEP_TO_INIV2, TAB_POS_IN_PERE, JOBASS, ETATASS
30 & , MUMPS_TPS_ARR, ZMUMPS_TPS_ARR, L0_OMP_MAPPING
49 TYPE (ZMUMPS_ROOT_STRUC) :: root
50 INTEGER COMM_LOAD, ASS_IRECV
54 INTEGER(8) LA, LRLU, LRLUS, LRLUSM, IPTRLU, POSFAC
55 INTEGER KEEP(500), ICNTL(60)
57 DOUBLE PRECISION DKEEP(230)
58 INTEGER,
INTENT(INOUT) :: INFO(2)
61 INTEGER,
TARGET :: IWPOS, LIW
62 TYPE (MUMPS_TPS_T),
TARGET,
OPTIONAL :: MUMPS_TPS_ARR(:)
63 TYPE (ZMUMPS_TPS_T),
TARGET,
OPTIONAL :: ZMUMPS_TPS_ARR(:)
64 INTEGER,
INTENT(IN),
OPTIONAL :: L0_OMP_MAPPING(:)
66 INTEGER,
PARAMETER :: LIDUMMY = 1
67 INTEGER,
TARGET :: IW(LIW)
68 INTEGER(8),
INTENT(IN) :: PTRARW(N), PTRAIW(N)
69 INTEGER ITLOC(N+KEEP(253)),
70 & nd(keep(28)), perm(n),
72 & ptrist(keep(28)), ptlust(keep(28)),
73 & step(n), pimaster(keep(28))
74 COMPLEX(kind=8) :: RHS_MUMPS(KEEP(255))
75 INTEGER(8) :: PTRFAC(KEEP(28)), PTRAST((28)),
77 INTEGER COMM, NBFIN, SLAVEF, MYID
78 INTEGER ISTEP_TO_INIV2(KEEP(71)),
79 & tab_pos_in_pere(slavef+2,
max(1,keep(56)))
80 INTEGER JOBASS,ETATASS
82 COMPLEX(kind=8),
TARGET :: A(LA)
83 INTEGER,
INTENT(IN) :: LRGROUPS(N)
84 DOUBLE PRECISION OPASSW, OPELIW
85 INTEGER(8),
INTENT(IN) :: LINTARR, LDBLARR
86 COMPLEX(kind=8) DBLARR(LDBLARR)
87 INTEGER INTARR(LINTARR)
89 INTEGER LBUFR, LBUFR_BYTES
90 INTEGER IPOOL( LPOOL )
91 INTEGER NSTK_S(KEEP(28))
92 INTEGER PROCNODE_STEPS(KEEP(28))
94 LOGICAL PACKED_CB, IS_CB_LR
95 INTEGER,
EXTERNAL :: MUMPS_TYPENODE
96 INTEGER,
EXTERNAL :: MUMPS_PROCNODE
101 include
'mumps_headers.h'
104 INTEGER NBPANELS_L, NBPANELS_U
105 INTEGER IN,NUMSTK,NASS,ISON,IFSON,NASS1,IELL
106 INTEGER NFS4FATHER, ESTIM_NFS4FATHER_ATSON
108 INTEGER(8) NFRONT8, LAELL8, LAELL_REQ8, ITMP8, KEEP8TMPCOPY
109 INTEGER NFRONT,NFRONT_EFF,ISTCHK,ISTCHK_CB_RIGHT,LSTK,LREQ
111 INTEGER :: SON_XXS, SON_XXLR, SON_XXG
112 INTEGER(8) LSTK8, SIZFR8
113 LOGICAL :: IS_DYNAMIC_CB
114 INTEGER(8) :: DYN_SIZE
116 INTEGER NCOLS, NROWS, LDA_SON
117 INTEGER NELIM, IORG, IBROT
118#if ! defined(ZERO_TRIANGLE)
119 INTEGER(8) :: NUMROWS, JJ3
125 INTEGER IJROW,NBCOL,,IOLDPS
126 INTEGER(8) IACHK, POSELT, LAPOS2, IACHK_ini
127 INTEGER(8) APOS, APOS2, APOS3, POSEL1, ICT12
128 INTEGER(8) :: JJ2, ICT13
129 INTEGER(8) :: JK8, J18, J28, J38, J48, JJ8
130 INTEGER(8) :: AINPUT8
131 INTEGER :: K1, K2, K3, KK, KK1
133 INTEGER , NSLSON, NPIVS,NPIV_ANA,NPIV
134 INTEGER PTRCOL, ISLAVE, PDEST,LEVEL
135 INTEGER ISON_IN_PLACE
136 LOGICAL SKIP_TOP_STACK
138 INTEGER(8) SIZE_ISON_TOP8, DYN_SIZE_ISON_TOP8
139 LOGICAL RESET_TO_ZERO, RISK_OF_SAME_POS,
140 & risk_of_same_pos_this_line
144 INTEGER INDX, FIRST_INDEX, SHIFT_INDEX
146 LOGICAL BLOCKING, SET_IRECV, MESSAGE_RECEIVED
148 LOGICAL COMPRESS_PANEL, LR_ACTIVATED, COMPRESS_CB,
149 & oocwrite_compatible_with_blr
151 INTEGER,
POINTER :: SON_IWPOS, SON_LIW
152 INTEGER,
POINTER,
DIMENSION(:) :: SON_IW
153 COMPLEX(kind=8),
POINTER,
DIMENSION(:) :: SON_A
156 INTEGER,
POINTER,
DIMENSION(:) :: BEGS_BLR
157 INTEGER :: NB_BLR, NPARTSCB, NPARTSASS, MAXI_CLUSTER,
161 parameter( zero = (0.0d0,0.0d0) )
164 LOGICAL MUMPS_INSSARBR
166 DOUBLE PRECISION FLOP1,FLOP1_EFF
168 LOGICAL MUMPS_IN_OR_ROOT_SSARBR
171 lpok = ((lp.GT.0).AND.(icntl(4).GE.1))
178 level = mumps_typenode(procnode_steps(step(inode)),keep(199))
180 WRITE(*,*)
'INTERNAL ERROR 1 in ZMUMPS_FAC_ASM_NIV1 '
184 hf = 6 + nslaves + keep(ixsz)
185 IF (jobass.EQ.0)
THEN
189 ioldps = ptlust(step(inode))
190 nfront = iw(ioldps + keep(ixsz))
191 nass1 = iabs(iw(ioldps + 2 + keep(ixsz)))
192 ict11 = ioldps + hf - 1 + nfront
193 ssarbr=mumps_inssarbr(procnode_steps(step(inode)),
203 IF (ison .NE. 0)
THEN
204 DO WHILE (ison .GT. 0)
206 ison = frere(step(ison))
222 IF (ison .NE. 0)
THEN
223 DO WHILE (ison .GT. 0)
226 IF (keep(400).GT.0)
THEN
227 IF (
present(l0_omp_mapping))
THEN
228 ithread=l0_omp_mapping(step(ison))
229 IF (ithread .NE.0)
THEN
230 son_iw=>mumps_tps_arr(ithread)%IW
234 nass = nass + son_iw(pimaster(step(ison))+1+keep(ixsz))
235 ison = frere(step(ison))
238 nfront = nd(step(inode)) + nass + keep(253)
239 nass1 = nass + numorg
242 & keep(489), keep(490), keep(491), keep(492),
243 & keep(20), keep(60), dad(step(inode)), keep(38),
244 & lrstatus, n, lrgroups)
245 IF (dad(step(inode)).NE.0)
THEN
246 IF ( mumps_procnode(procnode_steps(step(dad(step(inode)))),
250 & mumps_typenode(procnode_steps(step(dad(step(inode)))),
254 IF (lrstatus.EQ.1 .OR. lrstatus.EQ.3)
THEN
255 lrstatus = lrstatus-1
259 compress_panel = (lrstatus.GE.2)
260 compress_cb = ((lrstatus.EQ.1).OR.
262 lr_activated = (lrstatus.GT.0)
263 IF (compress_cb.AND.(.NOT.compress_panel))
THEN
264 compress_panel = .true.
267 oocwrite_compatible_with_blr =
268 & ( .NOT.lr_activated.OR.(.NOT.compress_panel).OR.
272 IF (keep(201).EQ.1.AND.oocwrite_compatible_with_blr)
THEN
274 & nbpanels_l, nbpanels_u, lreq_ooc)
276 lreq = hf + 2 * nfront + lreq_ooc
277 IF ((iwpos + lreq -1) .GT. iwposcb)
THEN
281 & iwpos, iwposcb, ptrist, ptrast,
282 & step, pimaster, pamaster, lrlus,
283 & keep(ixsz),
comp, dkeep(97), myid, slavef,
284 & procnode_steps, dad)
285 IF (lrlu .NE. lrlus)
THEN
287 WRITE(lp, * )
'INTERNAL ERROR 2 after compress '
288 WRITE(lp, * )
'IN ZMUMPS_FAC_ASM_NIV1 '
289 WRITE(lp, * )
'LRLU,LRLUS=', lrlu,lrlus
293 IF ((iwpos + lreq -1) .GT. iwposcb)
GOTO 270
298 ison_in_place = -9999
300 IF (keep(234).NE.0)
THEN
301 IF ( iwposcb .NE. liw )
THEN
302 IF ( iwposcb+iw(iwposcb
THEN
303 ison = iw( iwposcb + 1 + xxn )
304 IF ( dad( step( ison ) ) .EQ. inode .AND.
305 & mumps_typenode(procnode_steps(step(ison)),keep(199))
309 CALL mumps_geti8(size_ison_top8,iw(iwposcb + 1 + xxr))
310 CALL mumps_geti8(dyn_size_ison_top8, iw(iwposcb + 1 + xxd))
311 IF (dyn_size_ison_top8 .EQ. 0_8)
THEN
312 IF (lrlu .LT. int(nfront,8) * int(nfront,8))
THEN
321 IF (.NOT.
present(mumps_tps_arr).AND.
322 & .NOT.
present(l0_omp_mapping) )
THEN
324 & myid, inode, n, ioldps, hf, lp, lpok,
325 & nfront, nfront_eff, perm, dad,
326 & nass1, nass, numstk, numorg, iwposcb, iwpos,
327 & ifson, step, pimaster, ptrist, ptraiw, iw, liw
328 & intarr, lintarr, itloc, fils, frere,
329 & son_level2, niv1, keep, keep8, info(1),
331 & procnode_steps, slavef, idummy, lidummy )
334 & myid, inode, n, ioldps, hf, lp, lpok,
335 & nfront, nfront_eff, perm, dad,
336 & nass1, nass, numstk, numorg, iwposcb
337 & ifson, step, pimaster, ptrist, ptraiw, iw, liw,
338 & intarr, lintarr, itloc, fils, frere,
339 & son_level2, niv1, keep, keep8, info(1),
341 & procnode_steps, slavef, idummy, lidummy
342 & , mumps_tps_arr, l0_omp_mapping )
344 IF (info(1).LT.0)
GOTO 300
345 IF (nfront_eff.NE.nfront)
THEN
346 IF (nfront.GT.nfront_eff)
THEN
347 IF(mumps_in_or_root_ssarbr(procnode_steps(step(inode)),
349 npiv=nass1-(nfront_eff-nd(step(inode)))
356 & keep(50),1,flop1_eff)
360 iwpos = iwpos - ((2*nfront)-(2*nfront_eff))
362 lreq = hf + 2 * nfront + lreq_ooc
365 WRITE(lp,*)
' INTERNAL ERROR 3 ',
366 &
' IN ZMUMPS_FAC_ASM_NIV1 ',
367 &
' NFRONT, NFRONT_EFF = ',
373 IF (keep(201).EQ.1.AND.keep(50).NE.1.AND.
374 & oocwrite_compatible_with_blr)
THEN
376 & nbpanels_l, nbpanels_u, nass1,
377 & ioldps + hf + 2 * nfront, iw, liw)
380 maxfrw = max0(maxfrw, nfront)
381 ict11 = ioldps + hf - 1 + nfront
383 & lr_activated, parpiv_t1)
384 nfront8=int(nfront,8)
385 laell8 = nfront8 * nfront8
386 IF(parpiv_t1.NE.0)
THEN
387 laell8 = laell8+int(nass1,8)
390 IF ( ison_in_place > 0 )
THEN
391 laell_req8 = laell8 - size_ison_top8
393 skip_top_stack = (ison_in_place.GT.0)
395 & (0, laell_req8, skip_top_stack,
398 & lrlu,iptrlu,iwpos,iwposcb,
400 & step, pimaster,pamaster,lrlus,
401 & keep(ixsz),
comp, dkeep(97), myid,
402 & slavef, procnode_steps, dad,
404 IF (info(1).LT.0)
GOTO 490
406 lrlus = lrlus - laell8 + size_ison_top8
407 lrlusm =
min( lrlus, lrlusm )
408 itmp8 = laell8 - size_ison_top8
409 IF (keep(405).EQ.0)
THEN
410 keep8(69) = keep8(69) + itmp8
415 keep8tmpcopy = keep8(69)
418 keep8(68) =
max(keep8(68), keep8tmpcopy)
422 posfac = posfac + laell8
423 ssarbr=mumps_inssarbr(procnode_steps(step(inode)),keep(199))
427 & laell8-size_ison_top8,
430 IF (keep(405).EQ.0) keep(429)= keep(429)+1
431#if defined(ZERO_TRIANGLE)
432 lapos2 =
min(poselt + laell8 - 1_8, iptrlu)
433 a(poselt:lapos2) = zero
435 IF ( keep(50) .eq. 0 .OR. nfront .LT. keep(63) )
THEN
436 lapos2 =
min(poselt + laell8 - 1_8, iptrlu)
443 DO jj8 = poselt, lapos2
448 topdiag =
max(keep(7), keep(8), keep(218))-1
449 IF (lr_activated)
THEN
451 CALL get_cut(iw(ioldps+hf:ioldps+hf+nfront-1), nass1,
452 & ncb, lrgroups, npartscb,
453 & npartsass, begs_blr)
454 nb_blr = npartsass + npartscb
458 minsize = int(ibcksz2 / 2)
459 topdiag =
max(2*minsize + maxi_cluster-1,topdiag)
461 IF (etatass.EQ.1)
THEN
462 IF (keep(234).NE.0)
THEN
464 & .EQ.
"Internal error: ETATASS1 and IN-PLACE ACTIVATED"
473 DO jj8 = 0_8, nfront8 - 1_8
474 jj3 =
min(jj8+topdiag,int(nass1-1,8))
475 apos = poselt + jj8 * nfront8
476 a(apos:apos+jj3) = zero
480 numrows =
min(nfront8, (iptrlu-poselt) / nfront8 )
488 DO jj8 = 0_8, numrows - 1_8
489 apos = poselt + jj8 * nfront8
490 jj3 =
min( nfront8 - 1_8, jj8 + topdiag )
491 a(apos:apos + jj3) = zero
494 IF( numrows .LT. nfront8 )
THEN
495 apos = poselt + nfront8*numrows
496 a(apos :
min(iptrlu,apos+numrows)) = zero
501 ptrast(step(inode)) = poselt
502 ptrfac(step(inode)) = poselt
503 ptlust(step(inode)) = ioldps
504 iw(ioldps+xxi) = lreq
507 iw(ioldps+xxs) = -9999
508 iw(ioldps+xxn) = -99999
509 iw(ioldps+xxp) = -99999
510 iw(ioldps+xxa) = -99999
511 iw(ioldps+xxf) = -99999
512 iw(ioldps+xxlr) = lrstatus
513 iw(ioldps + keep(ixsz)) = nfront
514 iw(ioldps + keep(ixsz)+ 1) = 0
515 iw(ioldps + keep(ixsz) + 2) = -nass1
516 iw(ioldps + keep(ixsz) + 3) = -nass1
517 iw(ioldps + keep(ixsz) + 4) = step(inode)
518 iw(ioldps + keep(ixsz) + 5) = nslaves
519 IF (lr_activated.AND.
529 IF (info(1).LT.0)
GOTO 500
531 estim_nfs4father_atson = -9999
532 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
533 ifath = dad( step( inode) )
536 & mumps_typenode(procnode_steps(step(ifath)),keep(199))
538 ioldps = ptlust(step(inode))
540 & n, inode, ifath, fils, perm, keep,
541 & ioldps, hf, iw, liw, nfront, nass1,
542 & estim_nfs4father_atson
545 & estim_nfs4father_atson )
546 IF (info(1).LT.0)
GOTO 500
551 IF (numstk.NE.0)
THEN
552 IF (ison_top > 0)
THEN
557 DO 220 iell = 1, numstk
558 istchk = pimaster(step(ison))
564 IF (keep(400).GT.0)
THEN
565 IF (
present(l0_omp_mapping))
THEN
566 ithread=l0_omp_mapping(step(ison))
567 IF (ithread .NE.0)
THEN
568 son_liw => mumps_tps_arr(ithread)%LIW
569 son_iw => mumps_tps_arr(ithread)%IW
570 son_iwpos => mumps_tps_arr(ithread)%IWPOS
571 son_a => zmumps_tps_arr(ithread)%A
575 lstk = son_iw(istchk + keep(ixsz))
577 nelim = son_iw(istchk + keep(ixsz) + 1)
578 npivs = son_iw(istchk + keep(ixsz) + 3)
579 IF ( npivs .LT. 0 ) npivs = 0
580 nslson = son_iw(istchk + keep(ixsz) + 5)
581 hs = 6 + keep(ixsz) + nslson
583 same_proc = (istchk.LT.son_iwpos)
584 IF ( same_proc )
THEN
585 istchk_cb_right = ptrist(step(ison))
587 istchk_cb_right = istchk
589 son_xxs = son_iw(istchk_cb_right+xxs)
590 son_xxlr = son_iw(istchk_cb_right+xxlr)
591 son_xxg = son_iw(istchk_cb_right+xxg)
592 packed_cb = ( son_xxs .EQ. s_cb1comp )
593 is_cb_lr = ( son_xxlr.EQ.1 .OR. son_xxlr.EQ.3 )
594 & .AND. (keep(489).EQ.1.OR.keep(489).EQ.3)
596 IF (.NOT.same_proc)
THEN
597 nrows = son_iw( istchk + keep(ixsz) + 2)
601 sizfi = hs + nrows + ncols
602 k1 = istchk + hs + nrows + npivs
603 IF ( .NOT. level1 .AND. nelim.EQ.0 )
GOTO 205
604 IF (level1 .AND. .NOT. is_cb_lr)
THEN
607 sizfr8 = (lstk8*(lstk8+1_8)/2_8)
612 IF ( keep(50).eq.0 )
THEN
613 sizfr8 = int(nelim,8) * lstk8
616 sizfr8 = int(nelim,8) * int(nelim+1,8)/2_8
618 sizfr8 = int(nelim,8) * int(nelim,8)
623 IF (jobass.EQ.0)
THEN
624 IF (level1 .AND. .NOT. is_cb_lr)
THEN
625 IF (keep(50).EQ.0)
THEN
626 opassw = opassw + lstk8*lstk8
628 opassw = opassw + lstk8*(lstk8+1)/2_8
631 IF (keep(50).EQ.0)
THEN
632 opassw = opassw + int(nelim,8)*lstk8
634 opassw = opassw + int(nelim,8)*int(nelim,8)/2_8
638 CALL mumps_geti8(dyn_size, son_iw(istchk_cb_right+xxd))
639 is_dynamic_cb = dyn_size .GT. 0_8
640 IF ( is_dynamic_cb )
THEN
645 iachk = pamaster(step(ison))
647 IF (is_cb_lr .AND. level1)
THEN
648 posel1 = ptrast(step(inode))
650 & posel1, nfront, nass1, son_iw(istchk+xxf),
652 & lstk, nelim, k1, k1+lstk-1, keep(50),
653 & keep, keep8, opassw)
655 IF ( keep(50) .eq. 0 )
THEN
656 posel1 = ptrast(step(inode)) - nfront8
657 IF (nfront .EQ. lstk.AND. ison.EQ.ison_in_place
658 & .AND.iachk + sizfr8 - 1_8 .EQ. posfac - 1_8 )
THEN
662 reset_to_zero = (iachk .LT. posfac .AND.
663 & ison.EQ.ison_in_place)
664 risk_of_same_pos = iachk + sizfr8 - 1_8 .EQ. posfac - 1_8
665 & .AND. ison.EQ.ison_in_place
666 risk_of_same_pos_this_line = .false.
674 apos = posel1 + int(son_iw(kk),8) * int(nfront,8)
675 iachk = iachk_ini + int(kk-k1,8)*int(lstk,8)
676 IF (reset_to_zero)
THEN
677 IF (risk_of_same_pos)
THEN
679 risk_of_same_pos_this_line =
681 & .AND. ( apos + int(son_iw(k1+lstk-1)-1,8).EQ.
682 & iachk+int(lstk-1,8) )
685 IF ((iachk .GE. posfac).AND.(kk>k1))
THEN
686 reset_to_zero =.false.
688 IF (risk_of_same_pos_this_line)
THEN
691 IF ( iachk+int(kk1-1,8) .NE. jj2 )
THEN
692 a(jj2) = a(iachk + int(kk1 - 1,8))
693 a(iachk + int(kk1 -1,8)) = zero
701 jj2 = apos + int(son_iw
702 a(jj2) = a(iachk + int(kk1 - 1,8))
703 a(iachk + int(kk1 -1,8)) = zero
711 jj2 = apos + int(son_iw(k1+kk1-1),8) - 1_8
712 a(jj2) = a(jj2) + son_a(iachk + int(kk1 - 1,8))
720 IF (level1 .AND. .NOT. is_cb_lr)
THEN
725 IF (ison .EQ. ison_in_place)
THEN
727 & ptrast(step( inode )), nfront, nass1,
728 & iachk, lda_son, sizfr8,
729 & son_iw( k1 ), k2 - k1 + 1, nelim, etatass,
732 IF (sizfr8 .GT. 0)
THEN
734 & ptrast(step( inode )), nfront, nass1,
736 & son_iw( k1 ), k2 - k1 + 1, nelim, etatass,
744 IF (same_proc) istchk = ptrist(step(ison))
745 IF ((same_proc).AND.etatass.NE.1)
THEN
746 IF (keep(50).NE.0)
THEN
761 son_iw(kk) = son_iw(kk - nrows)
763 IF (nelim .NE. 0)
THEN
769 jpos = son_iw(kk) + ict11
770 son_iw(kk) = iw(jpos)
775 IF (etatass.NE.1)
THEN
776 IF ( same_proc )
THEN
777 ptrist(step(ison)) = -99999999
779 pimaster(step( ison )) = -99999999
781 IF (ithread .EQ. 0)
THEN
783 & ssarbr, myid, n, istchk,
784 & iw, liw, lrlu, lrlus, iptrlu,
785 & iwposcb, la, keep,keep8,
786 & (ison .EQ. ison_top)
791 & ssarbr, myid, n, istchk,
792 & mumps_tps_arr(ithread
793 & mumps_tps_arr(ithread)%LIW,
794 & mumps_tps_arr(ithread)%LRLU,
795 & mumps_tps_arr(ithread)%LRLUS,
796 & mumps_tps_arr(ithread)%IPTRLU,
797 & mumps_tps_arr(ithread)%IWPOSCB,
798 & mumps_tps_arr(ithread)%LA, keep,keep8, .false.
802 IF (is_dynamic_cb)
THEN
805 & keep(405).EQ.1, keep8 )
809 pdest = istchk + 6 + keep(ixsz)
810 ncbson = lstk - nelim
811 ptrcol = istchk + hs + nrows + npivs + nelim
812 DO islave = 0, nslson-1
813 IF (iw(pdest+islave).EQ.myid)
THEN
815 & keep, keep8, ison, step, n, slavef,
816 & istep_to_iniv2, tab_pos_in_pere,
819 & trow_size, first_index )
820 shift_index = first_index - 1
821 indx = ptrcol + shift_index
823 & bufr, lbufr, lbufr_bytes,
824 & inode, ison, nslaves, idummy,
825 & nfront, nass1, nfs4father,
826 & trow_size, iw( indx ),
828 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
829 & lrlus, n, iw, liw, a, la,
830 & ptrist, ptlust, ptrfac, ptrast, step,
831 & pimaster, pamaster, nstk_s,
comp,
832 & info(1), info(2), myid, comm, perm, ipool, lpool,
833 & leaf, nbfin, icntl, keep, keep8, dkeep, root,
834 & opassw, opeliw, itloc, rhs_mumps, fils, dad,
835 & ptrarw, ptraiw, intarr, dblarr, nd, frere,
836 & lptrar, nelt, iw, iw,
838 & istep_to_iniv2, tab_pos_in_pere, lrgroups
840 IF ( info(1) .LT. 0 )
GOTO 500
844 IF (pimaster(step(ison)).GT.0)
THEN
846 DO WHILE (ierr.EQ.-1)
847 ptrcol = pimaster(step(ison)) + hs + nrows + npivs + nelim
848 pdest = pimaster(step(ison)) + 6 + keep(ixsz)
850 & inode, nfront, nass1, nfs4father,
852 & izero, idummy, iw(ptrcol), ncbson,
853 & comm, ierr, iw(pdest), nslson, slavef,
854 & keep, keep8, step, n,
855 & istep_to_iniv2, tab_pos_in_pere
860 message_received = .false.
862 & blocking, set_irecv, message_received,
863 & mpi_any_source, mpi_any_tag,
865 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
866 & iwpos, iwposcb, iptrlu,
867 & lrlu, lrlus, n, iw, liw, a, la,
868 & ptrist, ptlust, ptrfac,
869 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
870 & info(1), info(2), comm,
872 & ipool, lpool, leaf,
873 & nbfin, myid, slavef,
874 & root, opassw, opeliw, itloc, rhs_mumps,
875 & fils, dad, ptrarw, ptraiw,
876 & intarr, dblarr, icntl, keep, keep8,dkeep, nd, frere,
877 & lptrar, nelt, iw, iw,
878 & istep_to_iniv2, tab_pos_in_pere, .true., lrgroups )
879 IF ( info(1) .LT. 0 )
GOTO 500
882 IF (ierr .EQ. -2)
GOTO 290
883 IF (ierr .EQ. -3)
GOTO 295
886 ison = frere(step(ison))
887 IF (ison .LE. 0)
THEN
892 IF (etatass.EQ.2)
GOTO 500
893 poselt = ptrast(step(inode))
895 DO 260 iorg = 1, numorg
897 ainput8 = ptrarw(ibrot)
900 j28 = j18 + intarr(jk8)
902 j48 = j28 - intarr(jj8)
904 ict12 = poselt + int(ijrow - nfront - 1,8)
906 IF ( keep(265).NE. 0 )
THEN
910 apos2 = ict12 + int(intarr(jj8),8) * nfront8
911 a(apos2) = a(apos2) + dblarr(ainput8)
912 ainput8 = ainput8 + 1_8
917 apos2 = ict12 + int(intarr(jj8),8) * nfront8
918 a(apos2) = a(apos2) + dblarr(ainput8)
919 ainput8 = ainput8 + 1_8
923 IF (j38 .LE. j48)
THEN
924 ict13 = poselt + int(ijrow - 1,8) * nfront8
925 nbcol = int(j48 - j38 + 1_8)
927 IF ( keep(265) .NE. 0 )
THEN
930 DO jj8 = 1_8, int(nbcol,8)
931 apos3 = ict13 + int(intarr(j38 + jj8 - 1_8) - 1_8,8)
932 a(apos3) = a(apos3) + dblarr(ainput8 + jj8 - 1_8)
936 DO jj8 = 1_8, int(nbcol,8)
937 apos3 = ict13 + int(intarr(j38 + jj8 - 1_8) - 1_8,8)
938 a(apos3) = a(apos3) + dblarr(ainput8 + jj8 - 1_8)
943 IF (keep(50).EQ.0)
THEN
946 & int(ijrow-1,8) * nfront8 +
947 & int(nfront-keep(253)+j253-1,8)
948 a(apos) = a(apos) + rhs_mumps( (j253-1)*keep(254)+ibrot )
953 & int(nfront-keep(253)+j253-1,8) * nfront8 +
955 a(apos) = a(apos) + rhs_mumps( (j253-1)*keep(254)+ibrot )
960 IF (parpiv_t1.NE.0.AND.(.NOT.son_level2))
THEN
961 ioldps = ptlust(step(inode))
963 & n, inode, iw, liw, a, la, keep, perm,
965 & nfront, nass1, lr_activated, parpiv_t1, nass)
973 &
' FAILURE IN INTEGER ALLOCATION DURING ZMUMPS_FAC_ASM'
979 &
' FAILURE, SEND BUFFER TOO SMALL DURING ZMUMPS_FAC_ASM'
982 lreq = ncbson + 6+nslson+keep(ixsz)
983 info(2) = lreq * keep( 34 )
988 &
' FAILURE, RECV BUFFER TOO SMALL DURING ZMUMPS_FAC_ASM'
991 lreq = ncbson + 6+nslson+keep(ixsz)
992 info(2) = lreq * keep( 34 )
995 IF( info(1).EQ.-13 )
THEN
998 &
' FAILURE IN INTEGER DYNAMIC ALLOCATION DURING ZMUMPS_FAC_ASM'
1000 info(2) = numstk + 1
1003 IF ( keep(405) .EQ. 0 )
THEN
1010 & N, INODE, IW, LIW, A, LA, INFO,
1011 & ND, FILS, FRERE, DAD,
1013 & ISTEP_TO_INIV2, TAB_POS_IN_PERE,
1015 & OPASSW, OPELIW, PTRIST, PTLUST, PTRFAC,
1016 & PTRAST, STEP, PIMASTER, PAMASTER, PTRARW, NSTK_S,
1017 & PTRAIW, ITLOC, RHS_MUMPS, NSTEPS,
1018 & COMP, LRLU, IPTRLU, IWPOS, IWPOSCB, POSFAC, LRLUS,
1019 & ICNTL, KEEP, KEEP8,DKEEP,INTARR,LINTARR,DBLARR,LDBLARR,
1020 & PROCNODE_STEPS, SLAVEF, COMM,MYID,
1021 & BUFR, LBUFR, LBUFR_BYTES, NBFIN, LEAF, IPOOL, LPOOL,
1037 TYPE (ZMUMPS_ROOT_STRUC) :: root
1038 INTEGER COMM_LOAD, ASS_IRECV
1039 INTEGER N,LIW,NSTEPS, NBFIN
1040 INTEGER KEEP(500), ICNTL(60)
1041 INTEGER(8) KEEP8(150)
1042 DOUBLE PRECISION DKEEP(230)
1043 INTEGER(8) :: LRLUS, LRLU, IPTRLU, POSFAC, LA
1044 INTEGER,
INTENT(INOUT) :: INFO(2)
1045 INTEGER INODE, , LPOOL, LEAF,
1046 & IWPOS, IWPOSCB, COMP, SLAVEF
1047 COMPLEX(kind=8),
TARGET :: A(LA)
1048 INTEGER,
intent(in) :: LRGROUPS(N)
1049 DOUBLE PRECISION , OPELIW
1050 INTEGER COMM, MYID, LBUFR, LBUFR_BYTES
1051 INTEGER,
DIMENSION(0:SLAVEF - 1) :: MEM_DISTRIB
1052 INTEGER IPOOL(LPOOL)
1053 INTEGER(8) :: PTRAST(KEEP(28))
1054 INTEGER(8) :: PTRFAC(KEEP(28))
1055 INTEGER(8) :: PAMASTER(KEEP(28))
1056 INTEGER(8),
INTENT(IN) :: PTRARW(N), PTRAIW(N)
1057 INTEGER IW(LIW), ITLOC(N+KEEP(253)),
1059 & fils(n), frere(keep(28)), dad(keep(28)),
1060 & ptrist(keep(28)), ptlust(keep(28)),
1062 & pimaster(keep(28)),
1063 & nstk_s(keep(28)), perm(n)
1064 COMPLEX(kind=8) :: RHS_MUMPS(KEEP(255))
1065 INTEGER CAND(SLAVEF+1, max(1,(56)))
1067 & tab_pos_in_pere(slavef+2,max(1,keep(56)))
1068 INTEGER PROCNODE_STEPS(KEEP(28)), BUFR(LBUFR)
1069 INTEGER(8),
INTENT(IN) :: LINTARR,LDBLARR
1070 COMPLEX(kind=8) DBLARR(LDBLARR)
1071 INTEGER INTARR(LINTARR)
1074 INTEGER :: STATUS(MPI_STATUS_SIZE)
1076 INTEGER LP, HS, HF, HF_OLD, NCBSON, NSLAVES_OLD
1079 INTEGER ,NUMSTK,,ISON,IFSON,NASS1,IELL
1080 INTEGER :: IBC_SOURCE
1081 COMPLEX(kind=8),
DIMENSION(:),
POINTER :: SON_A
1082 INTEGER :: MAXWASTEDPROCS
1083 parameter(maxwastedprocs=1)
1084 INTEGER , ESTIM_NFS4FATHER_ATSON
1087 INTEGER NFRONT,NFRONT_EFF,ISTCHK,ISTCHK_CB_RIGHT,LSTK,LREQ
1089 INTEGER(8) :: LAELL8
1091 INTEGER NBPANELS_L, NBPANELS_U
1092 LOGICAL PACKED_CB, IS_CB_LR
1094 LOGICAL :: IS_DYNAMIC_CB
1095 INTEGER(8) :: DYN_SIZE
1098 INTEGER :: K1, K2, KK, KK1
1100 INTEGER(8) :: JK8, AINPUT8, J18, J28, J38, J48, JJ8
1101 INTEGER(8) :: LAPOS2, JJ2, JJ3
1103 INTEGER(8) :: IACHK, APOS, APOS2, POSELT, ICT12, POSEL1
1109 INTEGER NELIM,NPIVS,NCOLS,NROWS,
1111 INTEGER , LDA_SON, , IBROT
1112 INTEGER NBCOL,NUMORG,IOLDPS, NUMORG_SPLIT
1113 INTEGER NSLAVES, NSLSON
1114 INTEGER NBLIG, PTRCOL, PTRROW, PDEST
1118 INTEGER ISON_IN_PLACE
1119 LOGICAL IS_ofType5or6, SPLIT_MAP_RESTART
1120 INTEGER NMB_OF_CAND, NMB_OF_CAND_ORIG
1121 LOGICAL SAME_PROC, NIV1, SON_LEVEL2
1122 LOGICAL BLOCKING, SET_IRECV, MESSAGE_RECEIVED
1123 INTEGER TROW_SIZE, INDX, FIRST_INDEX, SHIFT_INDEX
1125 LOGICAL COMPRESS_PANEL, LR_ACTIVATED, COMPRESS_CB,
1126 & oocwrite_compatible_with_blr
1129 parameter( izero = 0 )
1132 COMPLEX(kind=8) ZERO
1133 DOUBLE PRECISION RZERO
1134 PARAMETER( RZERO = 0.0d0 )
1135 parameter( zero = (0.0d0,0.0d0) )
1136 INTEGER NELT, LPTRAR
1137 logical :: force_cand
1139 include
'mumps_headers.h'
1140 INTEGER(8) :: APOSMAX
1141 DOUBLE PRECISION MAXARR
1142 INTEGER INIV2, SIZE_TMP_SLAVES_LIST, allocok
1143 INTEGER NCB_SPLIT, SIZE_LIST_SPLIT, NBSPLIT
1144 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: TMP_SLAVES_LIST, COPY_CAND
1145 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: SONROWS_PER_ROW
1146 INTEGER,
POINTER,
DIMENSION(:) :: BEGS_BLR
1147 INTEGER :: NB_BLR, NPARTSCB, NPARTSASS, MAXI_CLUSTER,
1152 lpok = ((lp.GT.0).AND.(icntl(4).GE.1))
1153 is_oftype5or6 = .false.
1158 keep(429) = keep(429)+1
1171 DO WHILE (ison .GT. 0)
1173 IF ( keep(48)==5 .AND.
1174 & mumps_typenode(procnode_steps(step(ison)),
1175 & keep(199)) .EQ. 1)
THEN
1177 & max(ncbson_max,iw(pimaster(step(ison))+keep(ixsz)))
1179 nass = nass + iw(pimaster(step(ison)) + 1 + keep(ixsz))
1180 ison = frere(step(ison))
1182 nfront = nd(step(inode)) + nass + keep(253)
1183 nass1 = nass + numorg
1184 ncb = nfront - nass1
1186 & keep(489), keep(490), keep
1187 & keep(20), keep(60), dad(step(inode)), keep(38),
1188 & lrstatus, n, lrgroups)
1189 compress_panel = (lrstatus.GE.2)
1190 compress_cb = ((lrstatus.EQ.1).OR.
1192 lr_activated = (lrstatus.GT.0)
1193 IF (compress_cb.AND.(.NOT.compress_panel))
THEN
1194 compress_panel = .true.
1197 oocwrite_compatible_with_blr =
1198 & ( .NOT.lr_activated.OR.(.NOT.compress_panel).OR.
1201 IF((keep(24).eq.0).or.(keep(24).eq.1))
then
1204 force_cand=(mod(keep(24),2).eq.0)
1208 is_oftype5or6 = (typesplit.EQ.5 .OR. typesplit.EQ.
1209 istchk = pimaster(step(ifson))
1210 pdest = istchk + 6 + keep(ixsz)
1211 nslson = iw(istchk + keep(ixsz) + 5)
1212 split_map_restart = .false.
1213 IF (force_cand)
THEN
1214 iniv2 = istep_to_iniv2( step( inode ))
1215 nmb_of_cand = cand( slavef+1, iniv2 )
1216 nmb_of_cand_orig = nmb_of_cand
1217 size_tmp_slaves_list = nmb_of_cand
1218 IF (is_oftype5or6)
THEN
1219 DO i=nmb_of_cand+1,slavef
1220 IF ( cand( i, iniv2 ).LT.0)
EXIT
1221 nmb_of_cand = nmb_of_cand +1
1223 size_tmp_slaves_list = nslson-1
1224 IF (inode.EQ.-999999)
THEN
1228 IF (is_oftype5or6.AND.split_map_restart)
THEN
1230 is_oftype5or6 = .false.
1231 size_tmp_slaves_list = nmb_of_cand
1232 cand(slavef+1, iniv2) = size_tmp_slaves_list
1236 size_tmp_slaves_list = slavef - 1
1237 nmb_of_cand = slavef - 1
1238 nmb_of_cand_orig = slavef - 1
1240 ALLOCATE(tmp_slaves_list(size_tmp_slaves_list
1241 IF (allocok > 0 )
THEN
1244 IF ( (typesplit.EQ.4)
1245 & .OR.(typesplit.EQ.5).OR.(typesplit.EQ.6)
1247 IF (typesplit.EQ.4)
THEN
1248 ALLOCATE(copy_cand(slavef+1),stat=allocok)
1249 IF (allocok > 0 )
THEN
1253 & inode, step, n, slavef,
1254 & procnode_steps, keep, dad, fils,
1255 & cand(1,iniv2), icntl, copy_cand,
1256 & nbsplit, numorg_split, tmp_slaves_list(1),
1257 & size_tmp_slaves_list
1259 ncb_split = ncb-numorg_split
1260 size_list_split = size_tmp_slaves_list - nbsplit
1263 & mem_distrib(0), ncb_split, nfront, nslaves,
1264 & tab_pos_in_pere(1,iniv2),
1265 & tmp_slaves_list(nbsplit+1),
1266 & size_list_split,inode
1268 DEALLOCATE (copy_cand)
1270 & inode, step, n, slavef, nbsplit, ncb,
1273 & tab_pos_in_pere(1,iniv2),
1276 IF (split_map_restart)
THEN
1277 is_oftype5or6 = .true.
1280 cand( slavef+1, iniv2 ) = nmb_of_cand_orig
1283 istchk = pimaster(step(ifson))
1285 nslson = iw(istchk + keep(ixsz) + 5)
1286 IF (keep(376) .EQ. 1)
THEN
1287 nfront = iw( pimaster(step(ifson)) + keep(ixsz))
1290 & inode, typesplit, ifson,
1291 & cand(1,iniv2), nmb_of_cand_orig,
1292 & iw(pdest), nslson,
1294 & procnode_steps, keep, dad, fils,
1295 & icntl, istep_to_iniv2, iniv2,
1296 & tab_pos_in_pere, nslaves,
1298 & size_tmp_slaves_list
1303 & icntl, cand(1,iniv2),
1304 & mem_distrib(0), ncb, nfront, nslaves,
1305 & tab_pos_in_pere(1,iniv2),
1307 & size_tmp_slaves_list,inode
1310 hf = nslaves + 6 + keep(ixsz)
1312 IF (keep(201).EQ.1.AND.oocwrite_compatible_with_blr)
THEN
1314 & nbpanels_l, nbpanels_u, lreq_ooc)
1316 lreq = hf + 2 * nfront + lreq_ooc
1317 IF ((iwpos + lreq -1) .GT. iwposcb)
THEN
1321 & iwpos, iwposcb, ptrist, ptrast,
1322 & step, pimaster, pamaster,
1324 & comp, dkeep(97), myid, slavef,
1325 & procnode_steps, dad)
1326 IF (lrlu .NE. lrlus)
THEN
1328 WRITE(lp, * )
'PB compress ZMUMPS_FAC_ASM_NIV2 ',
1329 &
'LRLU,LRLUS=',lrlu,lrlus
1333 IF ((iwpos + lreq -1) .GT. iwposcb)
GOTO 270
1336 iwpos = iwpos + lreq
1338 ALLOCATE(sonrows_per_row(nfront-nass1), stat=allocok)
1339 IF (allocok > 0)
THEN
1342 ison_in_place = -9999
1344 & myid, inode, n, ioldps, hf, lp, lpok,
1345 & nfront, nfront_eff
1346 & nass1, nass, numstk, numorg, iwposcb, iwpos,
1347 & ifson, step, pimaster, ptrist, ptraiw, iw, liw,
1348 & intarr, lintarr, itloc, fils, frere,
1349 & son_level2, niv1, keep,keep8, info(1),
1351 & procnode_steps, slavef, sonrows_per_row,
1353 IF (info(1).LT.0)
GOTO 250
1354 IF ( nfront .NE. nfront_eff )
THEN
1356 & (typesplit.EQ.5) .OR. (typesplit.EQ.6))
THEN
1357 WRITE(*,*)
' Internal error 1 in fac_ass due to splitting ',
1358 &
' INODE, NFRONT, NFRONT_EFF =', inode, nfront, nfront_eff
1359 WRITE(*,*)
' SPLITTING NOT YET READY FOR THAT'
1362 IF (nfront.GT.nfront_eff)
THEN
1363 ncb = nfront_eff - nass1
1364 nslaves_old = nslaves
1366 IF (typesplit.EQ.4)
THEN
1367 ALLOCATE(copy_cand(slavef+1),stat=allocok)
1368 IF (allocok > 0 )
THEN
1372 & inode, step, n, slavef,
1373 & procnode_steps, keep, dad, fils,
1374 & cand(1,iniv2), icntl, copy_cand,
1375 & nbsplit, numorg_split, tmp_slaves_list(1),
1376 & size_tmp_slaves_list
1378 ncb_split = ncb-numorg_split
1379 size_list_split = size_tmp_slaves_list - nbsplit
1381 & slavef, keep,keep8,
1383 & mem_distrib(0), ncb_split, nfront_eff, nslaves,
1384 & tab_pos_in_pere(1,iniv2),
1385 & tmp_slaves_list(nbsplit+1),
1386 & size_list_split,inode
1388 DEALLOCATE (copy_cand)
1390 & inode, step, n, slavef, nbsplit, ncb,
1391 & procnode_steps, keep, dad, fils,
1393 & tab_pos_in_pere(1,iniv2),
1398 & slavef, keep, keep8, icntl,
1400 & mem_distrib(0), ncb, nfront_eff, nslaves,
1401 & tab_pos_in_pere(1,iniv2),
1402 & tmp_slaves_list, size_tmp_slaves_list,inode
1405 hf = nslaves + 6 + keep(ixsz)
1406 iwpos = iwpos - ((2*nfront)-(2*nfront_eff)) -
1407 & (nslaves_old - nslaves)
1408 IF (nslaves_old .NE. nslaves)
THEN
1409 IF (nslaves_old > nslaves)
THEN
1410 DO kk=0,2*nfront_eff-1
1411 iw(ioldps+hf+kk)=iw(ioldps+hf_old+kk)
1414 IF (iwpos - 1 > iwposcb )
GOTO 270
1415 DO kk=2*nfront_eff-1, 0, -1
1416 iw(ioldps+hf+kk) = iw(ioldps+hf_old+kk)
1421 lreq = hf + 2 * nfront + lreq_ooc
1424 WRITE(lp,*) myid,
': INTERNAL ERROR 2 ',
1425 &
' IN ZMUMPS_FAC_ASM_NIV2 , INODE=',
1426 & inode,
' NFRONT, NFRONT_EFF=', nfront, nfront_eff
1431 IF (keep(201).EQ.1.AND.keep(50).NE.1.AND.
1432 & oocwrite_compatible_with_blr)
THEN
1434 & nbpanels_l, nbpanels_u, nass1,
1435 & ioldps + hf + 2 * nfront, iw, liw)
1437 maxfrw = max0(maxfrw, nfront)
1438 ptlust(step(inode)) = ioldps
1439 iw(ioldps+keep(ixsz)) = nfront
1440 iw(ioldps + 1+keep(ixsz)) = 0
1441 iw(ioldps + 2+keep(ixsz)) = -nass1
1442 iw(ioldps + 3+keep(ixsz)) = -nass1
1443 iw(ioldps + 4+keep(ixsz)) = step(inode)
1444 iw(ioldps+5+keep(ixsz)) = nslaves
1445 iw(ioldps+6+keep(ixsz):ioldps+5+keep(ixsz)+nslaves)=
1446 & tmp_slaves_list(1:nslaves)
1447 estim_nfs4father_atson = -9999
1448 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1449 ifath = dad( step( inode) )
1450 IF (ifath.NE.0)
THEN
1451 IF (compress_cb.AND.
1452 & mumps_typenode(procnode_steps(step(ifath)),keep(199))
1454 ioldps = ptlust(step(inode))
1456 & n, inode, ifath, fils, perm, keep,
1457 & ioldps, hf, iw, liw, nfront, nass1,
1458 & estim_nfs4father_atson
1464 & tab_pos_in_pere(1,istep_to_iniv2(step(inode))),
1466 IF(keep(86).EQ.1)
THEN
1467 IF(mod(keep(24),2).eq.0)
THEN
1469 & cand(slavef+1,iniv2),
1471 & tab_pos_in_pere(1,istep_to_iniv2(step(inode))),
1472 & nass1, keep,keep8, tmp_slaves_list,
1474 ELSEIF((keep(24).EQ.0).OR.(keep(24).EQ.1))
THEN
1478 & tab_pos_in_pere(1,istep_to_iniv2(step(inode))),
1479 & nass1, keep,keep8, tmp_slaves_list,
1483 DEALLOCATE(tmp_slaves_list)
1484 IF (keep(50).EQ.0)
THEN
1485 laell8 = int(nass1,8) * int(nfront,8)
1488 laell8 = int(nass1,8)*int(nass1,8)
1489 IF(keep(219).NE.0.AND.keep(50) .EQ. 2)
1490 & laell8 = laell8+int(nass1,8)
1494 & (0, laell8, .false.,
1495 & keep(1), keep8(1),
1497 & lrlu,iptrlu,iwpos,iwposcb,
1499 & step, pimaster,pamaster,lrlus,
1500 & keep(ixsz), comp, dkeep(97), myid,
1501 & slavef, procnode_steps, dad,
1503 IF (info(1).LT.0)
GOTO 490
1504 lrlu = lrlu - laell8
1505 lrlus = lrlus - laell8
1506 keep8(67) =
min(lrlus, keep8(67))
1507 keep8(69) = keep8(69) + laell8
1508 keep8(68) = max(keep8(69), keep8(68))
1510 ptrast(step(inode)) = poselt
1511 ptrfac(step(inode)) = poselt
1512 posfac = posfac + laell8
1513 iw(ioldps+xxi) = lreq
1516 iw(ioldps+xxs) = -9999
1517 iw(ioldps+xxn) = -99999
1518 iw(ioldps+xxp) = -99999
1519 iw(ioldps+xxa) = -99999
1520 iw(ioldps+xxf) = -99999
1521 iw(ioldps+xxlr)= lrstatus
1522 iw(ioldps+xxg) = memnotpinned
1525 posel1 = poselt - int(ldafs,8)
1526#if defined(ZERO_TRIANGLE)
1527 lapos2 = poselt + laell8 - 1_8
1528 a(poselt:lapos2) = zero
1530 IF ( keep(50) .eq. 0 .OR. ldafs .lt. keep(63) )
THEN
1531 lapos2 = poselt + laell8 - 1_8
1534!$omp&
IF (lapos2 - poselt > int(keep(361),8) .AND. nomp .GT. 1)
1538 DO jj8 = poselt, lapos2
1543 topdiag = max(keep(7), keep(8))-1
1544 IF (lr_activated)
THEN
1546 CALL get_cut(iw(ioldps+hf:ioldps+hf+nfront-1), nass1,
1547 & 0, lrgroups, npartscb,
1548 & npartsass, begs_blr)
1549 nb_blr = npartsass + npartscb
1551 DEALLOCATE(begs_blr)
1553 minsize = int(ibcksz2 / 2)
1554 topdiag = max(2*minsize + maxi_cluster-1, topdiag)
1564 DO jj8 = 0_8, int(ldafs-1,8)
1565 apos = poselt + jj8 * int(ldafs,8)
1566 jj3 =
min( int(ldafs,8) - 1_8, jj8 + topdiag )
1570 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1571 aposmax = poselt + int(nass1,8)*int(nass1,8)
1572 a(aposmax:aposmax+int(ldafs-1,8))=zero
1576 IF ((numstk.NE.0).AND.(nass.NE.0))
THEN
1578 DO 220 iell = 1, numstk
1579 istchk = pimaster(step(ison))
1580 nelim = iw(istchk + keep(ixsz) + 1)
1581 IF (nelim.EQ.0)
GOTO 210
1582 lstk = iw(istchk + keep(ixsz))
1583 npivs = iw(istchk + 3+keep(ixsz))
1584 IF (npivs.LT.0) npivs=0
1585 nslson = iw(istchk + 5+keep(ixsz))
1586 hs = 6 + nslson + keep(ixsz)
1587 ncols = npivs + lstk
1588 same_proc = (istchk.LT.iwpos)
1589 IF ( same_proc )
THEN
1590 istchk_cb_right=ptrist(step(ison))
1592 istchk_cb_right=istchk
1594 son_xxs = iw(istchk_cb_right + xxs)
1595 packed_cb = ( son_xxs .EQ. s_cb1comp )
1596 IF (.NOT.same_proc)
THEN
1597 nrows = iw(istchk + keep(ixsz) + 2)
1601 IF (keep(50).EQ.0)
THEN
1603 lcb = int(nelim,8)*int(lstk,8)
1605 IF (nslson.EQ.0)
THEN
1607 is_cb_lr = iw(istchk_cb_right+xxlr).EQ. 1 .OR.
1608 & iw(istchk_cb_right+xxlr).EQ. 3
1621 lcb = (int(nelim,8)*int(nelim+1,8))/2_8
1623 lcb = int(lda_son,8)*int(nelim,8)
1626 IF (keep(50) .EQ. 0)
THEN
1627 opassw = opassw + dble(lcb)
1629 opassw = opassw + int(nelim,8)*int(nelim+1,8)/2_8
1633 & istchk_cb_right+xxd+1))
1634 IF ( is_dynamic_cb )
THEN
1635 CALL mumps_geti8(dyn_size, iw(istchk_cb_right+xxd))
1640 iachk = pamaster(step(ison))
1643 k1 = istchk + hs + nrows + npivs
1645 IF (keep(50).eq.0)
THEN
1646 IF (is_oftype5or6)
THEN
1648 DO jj8 = 1_8, int(nelim,8)*int(lstk,8)
1649 a(apos+jj8-1_8) = a(apos+jj8-1_8) + son_a(iachk+jj8-1_8)
1653 apos = posel1 + int(iw(kk),8) * int(ldafs,8)
1654 DO 160 kk1 = 1, lstk
1655 jj2 = apos + int(iw(k1 + kk1 - 1),8) - 1_8
1656 a(jj2) = a(jj2) + son_a(iachk + int(kk1 - 1,8))
1658 iachk = iachk + int(lstk,8)
1662 IF (lcb .GT. 0)
THEN
1664 & poselt, ldafs, nass1,
1666 & iw( k1 ), nelim, nelim, etatass,
1672 210 ison = frere(step(ison))
1676 aposmax = poselt + int(nass1,8)*int(nass1,8)
1677 DO 260 iorg = 1, numorg
1679 ainput8 = ptrarw(ibrot)
1682 j28 = j18 + intarr(jk8)
1684 j48 = j28 - intarr(jj8)
1686 ict12 = poselt + int(ijrow - 1 - ldafs, 8)
1689 IF (keep(219).NE.0)
THEN
1690 IF (intarr(jj8).LE.nass1)
THEN
1691 apos2 = ict12 + int(intarr(jj8),8
1692 a(apos2) = a(apos2) + dblarr(ainput8)
1693 ELSEIF (keep(50).EQ.2)
THEN
1694 maxarr = max(maxarr,abs(dblarr(ainput8)))
1697 IF (intarr(jj8).LE.nass1)
THEN
1698 apos2 = ict12 + int(intarr(jj8),8) * int(ldafs,8)
1699 a(apos2) = a(apos2) + dblarr(ainput8)
1702 ainput8 = ainput8 + 1_8
1704 IF(keep(219).NE.0.AND.keep(50) .EQ. 2)
THEN
1705 a(aposmax+int(ijrow-1,8)) =
cmplx(maxarr,kind=kind(a))
1707 IF (j38 .GT. j48)
GOTO 255
1708 ict13 = poselt + int(ijrow - 1,8) * int(ldafs,8)
1709 nbcol = int(j48 - j38 + 1_8)
1710 DO jj8 = 1_8, int(nbcol,8)
1711 jj3 = ict13 + int(intarr(j38 + jj8 - 1_8),8) - 1_8
1712 a(jj3) = a(jj3) + dblarr(ainput8 + jj8 - 1_8)
1715 IF (keep(50).EQ.0)
THEN
1716 DO j253 = 1, keep(253)
1718 & int(ijrow-1,8) * int(ldafs,8) +
1719 & int(ldafs-keep(253)+j253-1,8)
1720 a(apos) = a(apos) + rhs_mumps( (j253-1)*keep(254)+ibrot )
1725 ptrcol = ioldps + hf + nfront
1726 ptrrow = ioldps + hf + nass1
1727 pdest = ioldps + 6 + keep(ixsz)
1729 DO islave = 1, nslaves
1731 & keep,keep8, inode, step, n, slavef,
1732 & istep_to_iniv2, tab_pos_in_pere,
1735 & nblig, first_index )
1736 shift_index = first_index - 1
1738 DO WHILE (ierr .EQ.-1)
1739 IF ( keep(50) .eq. 0 )
THEN
1742 & sum(sonrows_per_row(first_index:first_index+nblig-1)),
1743 & nblig, iw(ptrrow), nbcol, iw(ptrcol), nass1,
1746 & estim_nfs4father_atson,
1747 & iw(pdest), ibc_source, nfront, comm, keep, ierr
1751 nbcol = nass1+shift_index
1753 & sum(sonrows_per_row(first_index:first_index+nblig-1)),
1754 & nblig, iw(ptrrow), nbcol, iw(ptrcol), nass1,
1756 & iw( ptlust(step(inode))+6+keep(ixsz)+islave),
1758 & estim_nfs4father_atson,
1759 & iw(pdest), ibc_source, nfront, comm, keep, ierr
1763 IF (ierr.EQ.-1)
THEN
1766 message_received = .false.
1768 & blocking, set_irecv, message_received,
1769 & mpi_any_source, mpi_any_tag,
1770 & status, bufr, lbufr,
1772 & procnode_steps, posfac, iwpos, iwposcb, iptrlu,
1773 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
1775 & ptrast, step, pimaster
1778 & ipool, lpool, leaf, nbfin, myid, slavef,
1779 & root, opassw, opeliw, itloc, rhs_mumps,
1780 & fils, dad, ptrarw, ptraiw,
1781 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
1782 & lptrar, nelt, iw, iw,
1783 & istep_to_iniv2, tab_pos_in_pere, .true.
1786 IF ( info(1) .LT. 0 )
GOTO 500
1787 IF (message_received)
THEN
1788 ioldps = ptlust(step(inode))
1789 ptrcol = ioldps + hf + nfront
1790 ptrrow = ioldps + hf + nass1 + shift_index
1794 IF (ierr .EQ. -2)
GOTO 300
1795 IF (ierr .EQ. -3)
GOTO 305
1796 ptrrow = ptrrow + nblig
1799 DEALLOCATE(sonrows_per_row)
1800 IF (numstk.EQ.0)
GOTO 500
1803 istchk = pimaster(step(ison))
1804 nelim = iw(istchk + 1 + keep(ixsz))
1805 lstk = iw(istchk + keep(ixsz))
1806 npivs = iw(istchk + 3 + keep(ixsz))
1807 IF ( npivs .LT. 0 ) npivs = 0
1808 nslson = iw(istchk + 5 + keep(ixsz))
1810 ncols = npivs + lstk
1811 same_proc = (istchk.LT.iwpos)
1812 IF (.NOT.same_proc)
THEN
1813 nrows = iw(istchk + 2 + keep(ixsz) )
1817 pdest = istchk + 6 + keep(ixsz)
1818 ncbson = lstk - nelim
1819 ptrcol = istchk + hs + nrows + npivs + nelim
1820 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1823 IF(iw(ptrcol+i) .GT. nass1)
THEN
1828 nfs4father = nfs4father + nelim
1832 IF (nslson.EQ.0)
THEN
1834 pdest1(1) = mumps_procnode(procnode_steps(step(ison)),
1836 IF (pdest1(1).EQ.myid)
THEN
1838 & bufr, lbufr, lbufr_bytes,
1839 & inode, ison, nslaves,
1840 & iw( ptlust(step(inode)) + 6 +keep(ixsz)),
1841 & nfront, nass1, nfs4father, ncbson, iw( ptrcol ),
1843 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
1844 & lrlus, n, iw, liw, a, la,
1845 & ptrist, ptlust, ptrfac, ptrast, step,
1846 & pimaster, pamaster, nstk_s, comp,
1847 & info(1), info(2), myid, comm, perm,
1848 & ipool, lpool, leaf,
1849 & nbfin, icntl, keep, keep8, dkeep, root,
1851 & itloc, rhs_mumps, fils, dad,
1852 & ptrarw, ptraiw, intarr, dblarr,
1853 & nd, frere, lptrar, nelt, iw, iw,
1854 & istep_to_iniv2, tab_pos_in_pere,
1856 IF ( info(1) .LT. 0 )
GOTO 500
1859 DO WHILE (ierr.EQ.-1)
1860 ptrcol = pimaster(step(ison)) + hs + nrows + npivs + nelim
1862 & inode, nfront,nass1,nfs4father,
1864 & nslaves, iw( ptlust(step(inode)) + 6 +keep(ixsz)),
1865 & iw(ptrcol), ncbson,
1866 & comm, ierr, pdest1, nslson, slavef,
1867 & keep,keep8, step, n,
1868 & istep_to_iniv2, tab_pos_in_pere
1870 IF (ierr.EQ.-1)
THEN
1873 message_received = .false.
1875 & blocking, set_irecv, message_received,
1876 & mpi_any_source, mpi_any_tag,
1877 & status, bufr, lbufr, lbufr_bytes,
1878 & procnode_steps, posfac, iwpos, iwposcb, iptrlu,
1879 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
1881 & ptrast, step, pimaster, pamaster, nstk_s, comp, info(1),
1884 & ipool, lpool, leaf, nbfin, myid, slavef,
1885 & root,opassw, opeliw, itloc, rhs_mumps, fils, dad,
1887 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
1890 & istep_to_iniv2, tab_pos_in_pere, .true.
1893 IF ( info(1) .LT. 0 )
GOTO 500
1896 IF (ierr .EQ. -2)
GOTO 290
1897 IF (ierr .EQ. -3)
GOTO 295
1900 IF (pimaster(step(ison)).GT.0)
THEN
1902 DO WHILE (ierr.EQ.-1)
1903 ptrcol = pimaster(step(ison)) + hs + nrows + npivs + nelim
1904 pdest = pimaster(step(ison)) + 6 + keep(ixsz)
1906 & inode, nfront, nass1, nfs4father,
1908 & nslaves, iw(ptlust(step(inode))+6+keep(ixsz)),
1909 & iw(ptrcol), ncbson,
1910 & comm, ierr, iw(pdest), nslson, slavef,
1911 & keep,keep8, step, n,
1912 & istep_to_iniv2, tab_pos_in_pere
1914 IF (ierr.EQ.-1)
THEN
1917 message_received = .false.
1919 & blocking, set_irecv, message_received,
1920 & mpi_any_source, mpi_any_tag,
1921 & status, bufr, lbufr,
1923 & procnode_steps, posfac, iwpos, iwposcb, iptrlu,
1924 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
1926 & ptrast, step, pimaster, pamaster, nstk_s, comp, info(1),
1929 & ipool, lpool, leaf, nbfin, myid, slavef,
1930 & root,opassw, opeliw, itloc, rhs_mumps,
1931 & fils, dad, ptrarw, ptraiw,
1932 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
1933 & lptrar, nelt, iw, iw,
1934 & istep_to_iniv2, tab_pos_in_pere, .true.
1937 IF ( info(1) .LT. 0 )
GOTO 500
1940 IF (ierr .EQ. -2)
GOTO 290
1941 IF (ierr .EQ. -3)
GOTO 295
1943 DO islave = 0, nslson-1
1944 IF (iw(pdest+islave).EQ.myid)
THEN
1946 & keep,keep8, ison, step, n, slavef,
1947 & istep_to_iniv2, tab_pos_in_pere,
1950 & trow_size, first_index )
1951 shift_index = first_index - 1
1952 indx = ptrcol + shift_index
1954 & bufr, lbufr, lbufr_bytes,
1955 & inode, ison, nslaves,
1956 & iw( ptlust(step(inode))+6+keep(ixsz)),
1957 & nfront, nass1,nfs4father,
1958 & trow_size, iw( indx ),
1960 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
1961 & lrlus, n, iw, liw, a, la,
1962 & ptrist, ptlust, ptrfac, ptrast, step,
1963 & pimaster, pamaster, nstk_s, comp, info(1), info(2),
1964 & myid, comm, perm, ipool, lpool, leaf,
1965 & nbfin, icntl, keep,keep8,dkeep, root,
1966 & opassw, opeliw, itloc, rhs_mumps, fils, dad,
1968 & intarr, dblarr, nd, frere, lptrar, nelt, iw,
1971 & istep_to_iniv2, tab_pos_in_pere, lrgroups)
1972 IF ( info(1) .LT. 0 )
GOTO 500
1977 ison = frere(step(ison))
1981 IF (info(1).EQ.-13)
THEN
1984 &
' FAILURE IN INTEGER DYNAMIC ALLOCATION DURING
1985 & ZMUMPS_FAC_ASM_NIV2'
1987 info(2) = numstk + 1
1992 WRITE( lp, * )
' FAILURE ALLOCATING COPY_CAND',
1993 &
' DURING ZMUMPS_FAC_ASM_NIV2'
2000 WRITE( lp, * )
' FAILURE ALLOCATING TMP_SLAVES_LIST',
2001 &
' DURING ZMUMPS_FAC_ASM_NIV2'
2004 info(2) = size_tmp_slaves_list
2011 &
' FAILURE IN INTEGER ALLOCATION DURING ZMUMPS_FAC_ASM_NIV2'
2016 WRITE( lp, * )
' FAILURE ALLOCATING SONROWS_PER_ROW',
2017 &
' DURING ZMUMPS_FAC_ASM_NIV2'
2020 info(2) = nfront-nass1
2023 IF ((icntl(1) .GT. 0) .AND. (icntl(4) .GE. 1))
THEN
2026 &
' FAILURE, SEND BUFFER TOO SMALL (1) DURING ZMUMPS_FAC_ASM_NIV2'
2029 lreq = ncbson + 6 + nslson+keep(ixsz)
2030 info(2) = lreq * keep( 34 )
2033 IF ((icntl(1) .GT. 0) .AND. (icntl(4) .GE. 1))
THEN
2036 &
' FAILURE, RECV BUFFER TOO SMALL (1) DURING ZMUMPS_FAC_ASM_NIV2'
2039 lreq = ncbson + 6 + nslson+keep(ixsz)
2040 info(2) = lreq * keep( 34 )
2043 IF ((icntl(1) .GT. 0) .AND. (icntl(4) .GE. 1))
THEN
2046 &
' FAILURE, SEND BUFFER TOO SMALL (2)',
2047 &
' DURING ZMUMPS_FAC_ASM_NIV2'
2050 lreq = nblig + nbcol + 4 + keep(ixsz)
2051 info(2) = lreq * keep( 34 )
2054 IF ((icntl(1) .GT. 0) .AND. (icntl(4) .GE. 1))
THEN
2057 &
' FAILURE, RECV BUFFER TOO SMALL (2)',
2058 &
' DURING ZMUMPS_FAC_ASM_NIV2'
2061 lreq = nblig + nbcol + 4 + keep(ixsz)
2062 info(2) = lreq * keep( 34 )