17 & NELT, FRT_PTR, FRT_ELT,
18 & N, INODE, IW, LIW, A, LA, INFO, ND,
19 & FILS, FRERE, DAD, MAXFRW, root,
20 & OPASSW, OPELIW, PTRIST, PTLUST, PTRFAC, PTRAST,
21 & STEP, PIMASTER, PAMASTER,PTRARW,
22 & PTRAIW, ITLOC, RHS_MUMPS, NSTEPS, SON_LEVEL2,
23 & COMP, LRLU, IPTRLU, IWPOS, IWPOSCB, POSFAC, LRLUS, LRLUSM,
24 & ICNTL, KEEP,KEEP8,DKEEP,INTARR,LINTARR,DBLARR,LDBLARR,
26 & NSTK_S,PROCNODE_STEPS, SLAVEF, COMM,MYID,
27 & BUFR, LBUFR, LBUFR_BYTES, NBFIN, IPOOL, LPOOL, LEAF,
29 & ISTEP_TO_INIV2, TAB_POS_IN_PERE
31 & , MUMPS_TPS_ARR, DMUMPS_TPS_ARR, L0_OMP_MAPPING
50 TYPE (DMUMPS_ROOT_STRUC) :: root
51 INTEGER COMM_LOAD, ASS_IRECV
56 INTEGER(8) LA, LRLU, LRLUS, LRLUSM, IPTRLU, POSFAC
57 INTEGER KEEP(500), ICNTL(60)
59 DOUBLE PRECISION DKEEP(230)
60 INTEGER,
INTENT(INOUT) :: INFO(2)
63 INTEGER,
TARGET :: IWPOS, LIW
64 TYPE (MUMPS_TPS_T),
TARGET,
OPTIONAL :: MUMPS_TPS_ARR(:)
65 TYPE (DMUMPS_TPS_T),
TARGET,
OPTIONAL :: DMUMPS_TPS_ARR(:)
66 INTEGER,
INTENT(IN),
OPTIONAL :: L0_OMP_MAPPING(:)
68 INTEGER,
PARAMETER :: LIDUMMY = 1
69 INTEGER,
TARGET :: IW(LIW)
70 INTEGER(8),
INTENT(IN) :: PTRARW(NELT+1), PTRAIW(NELT+1)
71 INTEGER ITLOC(N+KEEP(253)),
72 & nd(keep(28)), perm(n),
73 & fils(n), frere(keep(28)), dad(keep(28)),
74 & ptrist(keep(28)), ptlust(keep(28)),
75 & step(n), pimaster(keep(28))
76 DOUBLE PRECISION :: RHS_MUMPS(KEEP(255))
77 INTEGER(8) :: PTRFAC(KEEP(28)), PTRAST(KEEP(28)),
79 INTEGER COMM, NBFIN, SLAVEF, MYID
80 INTEGER ISTEP_TO_INIV2(KEEP(71)),
81 & tab_pos_in_pere(slavef+2,
max(1,keep(56)))
82 INTEGER FRT_PTR(N+1), FRT_ELT(NELT)
85 DOUBLE PRECISION,
TARGET :: A(LA)
86 INTEGER,
INTENT(IN) :: (N)
87 DOUBLE PRECISION OPASSW, OPELIW
88 INTEGER(8),
INTENT(IN) :: LINTARR, LDBLARR
90INTEGER INTARR(LINTARR)
92 INTEGER LBUFR, LBUFR_BYTES
93 INTEGER IPOOL( LPOOL )
94 INTEGER NSTK_S(KEEP(28))
95 INTEGER PROCNODE_STEPS(KEEP(28))
97 LOGICAL PACKED_CB, IS_CB_LR
98 INTEGER,
EXTERNAL :: MUMPS_TYPENODE
99 INTEGER,
EXTERNAL :: MUMPS_PROCNODE
102 INTEGER :: STATUS(MPI_STATUS_SIZE)
104 include
'mumps_headers.h'
107 INTEGER NBPANELS_L, NBPANELS_U
108 INTEGER IN,NUMSTK,NASS,ISON,IFSON,NASS1,IELL
109 INTEGER NFS4FATHER, ESTIM_NFS4FATHER_ATSON
112 INTEGER(8) NFRONT8, LAELL8, KEEP8TMPCOPY
113 INTEGER NFRONT,NFRONT_EFF,ISTCHK,ISTCHK_CB_RIGHT,LSTK,LREQ
115 INTEGER :: SON_XXS, SON_XXLR, SON_XXG
116 INTEGER(8) LSTK8, SIZFR8
117 LOGICAL :: IS_DYNAMIC_CB
118 INTEGER(8) :: DYN_SIZE
120 INTEGER NCOLS, NROWS, LDA_SON
121 INTEGER NELIM, IORG, IBROT
123#if ! defined(ZERO_TRIANGLE)
124 INTEGER(8) :: NUMROWS, JJ3
129 INTEGER(8) APOS, APOS2, LAPOS2
130 INTEGER(8) POSELT, POSEL1, ICT12, ICT21
133 INTEGER(8) :: JJ8, J18, J28
134 INTEGER(8) :: AINPUT8, AII8
135 INTEGER :: K1, K2, K3, KK, KK1
136 INTEGER JPOS,ICT11, IJROW
137 INTEGER Pos_First_NUMORG,NUMORG,,
140 INTEGER NSLAVES, NSLSON, NPIVS, NPIV_ANA, NPIV
141 INTEGER PTRCOL, ISLAVE, PDEST,LEVEL
143 INTEGER TROW_SIZE, INDX, FIRST_INDEX, SHIFT_INDEX
145 INTEGER(8) :: SIZE_ELTI8
148 LOGICAL BLOCKING, SET_IRECV, MESSAGE_RECEIVED
150 LOGICAL COMPRESS_PANEL, LR_ACTIVATED, COMPRESS_CB,
151 & oocwrite_compatible_with_blr
153 INTEGER,
POINTER :: SON_IWPOS, SON_LIW
154 INTEGER,
POINTER,
DIMENSION(:) :: SON_IW
155 DOUBLE PRECISION,
POINTER,
DIMENSION(:) ::
158 INTEGER,
POINTER,
DIMENSION(:) :: BEGS_BLR
159 INTEGER :: NB_BLR, NPARTSCB, NPARTSASS, MAXI_CLUSTER,
161 DOUBLE PRECISION ZERO
162 parameter( zero = 0.0d0 )
163 LOGICAL MUMPS_INSSARBR, SSARBR
164 EXTERNAL mumps_inssarbr
165 DOUBLE PRECISION FLOP1,
167 LOGICAL MUMPS_IN_OR_ROOT_SSARBR
170 lpok = ((lp.GT.0).AND.(icntl(4).GE.1))
176 level = mumps_typenode(procnode_steps(step(inode)),keep(199))
178 WRITE(*,*)
'INTERNAL ERROR 1 in DMUMPS_FAC_ASM_NIV1_ELT '
182 hf = 6 + nslaves + keep(ixsz)
183 numelt = frt_ptr(inode+1) - frt_ptr(inode)
184 IF ( numelt .ne. 0 )
THEN
185 elbeg = frt_ptr(inode)
200 IF (ison .NE. 0)
THEN
201 DO WHILE (ison .GT. 0)
204 IF (keep(400).GT.0)
THEN
205 IF (
present(l0_omp_mapping))
THEN
206 ithread=l0_omp_mapping(step
207 IF (ithread .NE.0)
THEN
208 son_iw=>mumps_tps_arr(ithread)%IW
212 nass = nass + son_iw(pimaster(step(ison))+1+keep(ixsz))
213 ison = frere(step(ison))
216 nfront = nd(step(inode)) + nass + keep(253)
217 nass1 = nass + numorg
220 & keep(489), keep(490), keep(491), keep(492),
221 & keep(20), keep(60), dad(step(inode)), keep(38),
222 & lrstatus, n, lrgroups)
223 IF (dad(step(inode)).NE.0)
THEN
224 IF ( mumps_procnode(procnode_steps(step(dad(step(inode)))),
228 & mumps_typenode(procnode_steps(step(dad(step(inode)))),
232 IF (lrstatus.EQ.1 .OR. lrstatus.EQ.3)
THEN
233 lrstatus = lrstatus-1
237 compress_panel = (lrstatus.GE.2)
240 lr_activated = (lrstatus.GT.0)
241 IF (compress_cb.AND.(.NOT.compress_panel))
THEN
242 compress_panel = .true.
245 oocwrite_compatible_with_blr =
246 & ( .NOT.lr_activated.OR.(.NOT.compress_panel).OR.
250 IF (keep(201).EQ.1.AND.oocwrite_compatible_with_blr)
THEN
252 & nbpanels_l, nbpanels_u, lreq_ooc)
254 lreq = hf + 2 * nfront + lreq_ooc
255 IF ((iwpos + lreq -1) .GT. iwposcb)
THEN
259 & iwpos, iwposcb, ptrist, ptrast,
260 & step, pimaster, pamaster, lrlus,
261 & keep(ixsz),
comp, dkeep(97), myid, slavef,
262 & procnode_steps, dad)
263 IF (lrlu .NE. lrlus)
THEN
264 WRITE( *, * )
'PB compress DMUMPS_FAC_ASM_NIV1_ELT'
265 WRITE( *, * )
'LRLU,LRLUS=',lrlu,lrlus
268 IF ((iwpos + lreq -1) .GT. iwposcb)
GOTO 270
273 IF (.NOT.
present(mumps_tps_arr).AND.
274 & .NOT.
present(l0_omp_mapping) )
THEN
276 & numelt, frt_elt(elbeg),
277 & myid, inode, n, ioldps, hf,
278 & nfront, nfront_eff, perm,
279 & nass1, nass, numstk, numorg, iwposcb, iwpos,
280 & ifson, step, pimaster, ptrist, ptraiw, nelt, iw, liw,
281 & intarr, lintarr, itloc, fils, frere,
283 & son_level2, niv1, info(1),
284 & dad,procnode_steps, slavef,
285 & frt_ptr, frt_elt, pos_first_numorg,
289 & numelt, frt_elt(elbeg),
290 & myid, inode, n, ioldps, hf,
291 & nfront, nfront_eff, perm,
292 & nass1, nass, numstk, numorg, iwposcb, iwpos,
293 & ifson, step, pimaster, ptrist, ptraiw, nelt, iw, liw,
294 & intarr, lintarr, itloc, fils, frere,
296 & son_level2, niv1, info(1),
297 & dad,procnode_steps, slavef,
298 & frt_ptr, frt_elt, pos_first_numorg,
300 & , mumps_tps_arr, l0_omp_mapping )
302 IF (info(1).LT.0)
GOTO 300
303 IF (nfront_eff.NE.nfront)
THEN
304 IF (nfront.GT.nfront_eff)
THEN
305 IF(mumps_in_or_root_ssarbr(procnode_steps(step(inode)),
307 npiv=nass1-(nfront_eff-nd(step(inode)))
314 & keep(50),1,flop1_eff)
318 iwpos = iwpos - ((2*nfront)-(2*nfront_eff))
320 lreq = hf + 2 * nfront + lreq_ooc
324 &
' ERROR 1 during ass_niv1_ELT', nfront, nfront_eff
329 IF (keep(201).EQ.1.AND.keep(50).NE.1.AND.
330 & oocwrite_compatible_with_blr)
THEN
332 & nbpanels_l, nbpanels_u, nass1,
333 & ioldps + hf + 2 * nfront, iw, liw)
336 maxfrw = max0(maxfrw, nfront
337 ict11 = ioldps + hf - 1 + nfront
339 & lr_activated, parpiv_t1)
340 nfront8=int(nfront,8)
341 laell8 = nfront8 * nfront8
342 IF(parpiv_t1.NE.0)
THEN
343 laell8 = laell8+int(nass1,8)
346 & (0, laell8, .false.,
349 & lrlu,iptrlu,iwpos,iwposcb,
352 & keep(ixsz),
comp, dkeep(97), myid,
353 & slavef, procnode_steps, dad,
355 IF (info(1).LT.0)
GOTO 490
357 lrlus = lrlus - laell8
358 lrlusm =
min( lrlus, lrlusm )
359 IF (keep(405).EQ.0)
THEN
360 keep8(69) = keep8(69) + laell8
361 keep8(68) =
max(keep8(69), keep8(68))
364 keep8(69) = keep8(69) + laell8
365 keep8tmpcopy = keep8(69)
368 keep8(68) =
max(keep8(6
372 posfac = posfac + laell8
373 ssarbr=mumps_inssarbr(procnode_steps(step(inode)),keep(199))
380 IF (keep(405).EQ.0) keep(429)= keep(429)+1
381#if defined(ZERO_TRIANGLE)
382 lapos2 = poselt + laell8 - 1_8
383 a(poselt:lapos2) = zero
385 IF ( keep(50) .eq. 0 .OR. nfront .LT. keep(63) )
THEN
386 lapos2 = poselt + laell8 - 1_8
393 DO jj8 = poselt, lapos2
398 topdiag =
max(keep(7), keep(8), keep(218))-1
399 IF (lr_activated)
THEN
401 CALL get_cut(iw(ioldps+hf:ioldps+hf+nfront-1), nass1,
402 & ncb, lrgroups, npartscb,
403 & npartsass, begs_blr)
404 nb_blr = npartsass + npartscb
408 minsize = int(ibcksz2 / 2)
409 topdiag =
max(2*minsize + maxi_cluster-1,topdiag)
419 DO jj8 = 0_8, numrows - 1_8
420 apos = poselt + jj8 * nfront8
421 jj3 =
min( nfront8 - 1_8, jj8 + topdiag )
422 a(apos:apos + jj3) = zero
427 ptrast(step(inode)) = poselt
428 ptrfac(step(inode)) = poselt
429 ptlust(step(inode)) = ioldps
430 iw(ioldps+xxi) = lreq
433 iw(ioldps+xxs) = -9999
434 iw(ioldps+xxn) = -99999
435 iw(ioldps+xxp) = -99999
436 iw(ioldps+xxa) = -99999
437 iw(ioldps+xxf) = -99999
438 iw(ioldps+xxlr) = lrstatus
439 iw(ioldps + keep(ixsz)) = nfront
440 iw(ioldps + keep(ixsz)+ 1) = 0
441 iw(ioldps + keep(ixsz) + 2) = -nass1
442 iw(ioldps + keep(ixsz) + 3) = -nass1
443 iw(ioldps + keep(ixsz) + 4) = step(inode)
444 iw(ioldps + keep(ixsz) + 5) = nslaves
445 IF (lr_activated.AND.
455 IF (info(1).LT.0)
GOTO 500
457 estim_nfs4father_atson = -9999
458 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
459 ifath = dad( step( inode) )
462 & mumps_typenode(procnode_steps(step(ifath)),keep(199))
464 ioldps = ptlust(step(inode))
466 & n, inode, ifath, fils, perm, keep,
467 & ioldps, hf, iw, liw, nfront, nass1,
468 & estim_nfs4father_atson
471 & estim_nfs4father_atson )
475 IF (numstk.NE.0)
THEN
477 DO 220 iell = 1, numstk
478 istchk = pimaster(step(ison))
484 IF (keep(400).GT.0)
THEN
485 IF (
present(l0_omp_mapping))
THEN
486 ithread=l0_omp_mapping(step(ison))
487 IF (ithread .NE.0)
THEN
488 son_liw => mumps_tps_arr(ithread)%LIW
489 son_iw => mumps_tps_arr(ithread)%IW
490 son_iwpos => mumps_tps_arr(ithread)%IWPOS
491 son_a => dmumps_tps_arr(ithread)%A
495 lstk = son_iw(istchk + keep(ixsz))
497 nelim = son_iw(istchk + keep(ixsz) + 1)
498 npivs = son_iw(istchk + keep(ixsz) + 3)
499 IF ( npivs .LT. 0 ) npivs = 0
500 nslson = son_iw(istchk + keep(ixsz) + 5)
501 hs = 6 + keep(ixsz) + nslson
503 same_proc = (istchk.LT.son_iwpos)
504 IF ( same_proc )
THEN
505 istchk_cb_right = ptrist(step(ison))
507 istchk_cb_right = istchk
509 son_xxs = son_iw(istchk_cb_right+xxs)
510 son_xxlr = son_iw(istchk_cb_right+xxlr)
511 son_xxg = son_iw(istchk_cb_right+xxg)
512 packed_cb = ( son_xxs .EQ. s_cb1comp )
513 is_cb_lr = ( son_xxlr.EQ.1 .OR. son_xxlr.EQ.3 )
514 & .AND. (keep(489).EQ.1.OR.keep(489).EQ.3)
516 IF (.NOT.same_proc)
THEN
517 nrows = son_iw( istchk + keep(ixsz) + 2)
521 sizfi = hs + nrows + ncols
522 k1 = istchk + hs + nrows + npivs
523 IF ( .NOT. level1 .AND. nelim.EQ.0 )
GOTO 205
524 IF (level1 .AND. .NOT. is_cb_lr)
THEN
527 sizfr8 = (lstk8*(lstk8+1_8)/2_8)
532 IF ( keep(50).eq.0 )
THEN
533 sizfr8 = int(nelim,8) * lstk8
536 sizfr8 = int(nelim,8) * int(nelim+1,8)/2_8
538 sizfr8 = int(nelim,8) * int(nelim,8)
543 IF (level1 .AND. .NOT. is_cb_lr)
THEN
544 IF (keep(50).EQ.0)
THEN
545 opassw = opassw + lstk8*lstk8
547 opassw = opassw + lstk8
550 IF (keep(50).EQ.0)
THEN
551 opassw = opassw + int(nelim,8)*lstk8
553 opassw = opassw + int(nelim,8)*int(nelim,8)/2_8
556 CALL mumps_geti8(dyn_size, son_iw(istchk_cb_right+xxd))
557 is_dynamic_cb = dyn_size .GT. 0_8
558 IF ( is_dynamic_cb )
THEN
563 iachk = pamaster(step(ison))
565 IF (is_cb_lr .AND. level1)
THEN
566 posel1 = ptrast(step(inode))
568 & posel1, nfront, nass1, son_iw(istchk+xxf),
570 & lstk, nelim, k1, k1+lstk-1, keep(50),
571 & keep, keep8, opassw)
573 IF ( keep(50) .eq. 0 )
THEN
574 posel1 = ptrast(step(inode)) - nfront8
580 apos = posel1 + int(son_iw(kk),8) * nfront8
585 jj2 = apos + int(son_iw(k1 + kk1 - 1) - 1,8)
586 a(jj2) = a(jj2) + son_a(iachk + int(kk1 - 1,8))
588 iachk = iachk + lstk8
592 IF (level1 .AND. .NOT. is_cb_lr)
THEN
597 IF (sizfr8 .GT. 0)
THEN
599 & ptrast(step( inode )), nfront, nass1,
601 & son_iw( k1 ), k2 - k1 + 1, nelim, etatass,
608 IF (same_proc) istchk = ptrist(step(ison))
610 IF (keep(50).NE.0)
THEN
616 son_iw(kk) = son_iw(kk - nrows)
625 son_iw(kk) = son_iw(kk - nrows)
627 IF (nelim .NE. 0)
THEN
633 jpos = son_iw(kk) + ict11
634 son_iw(kk) = iw(jpos)
639 IF ( same_proc )
THEN
640 ptrist(step(ison)) = -99999999
642 pimaster(step( ison )) = -99999999
644 IF (ithread .EQ. 0)
THEN
646 & ssarbr, myid, n, istchk,
647 & iw, liw, lrlu, lrlus, iptrlu,
648 & iwposcb, la, keep,keep8,
654 & ssarbr, myid, n, istchk,
655 & mumps_tps_arr(ithread)%IW(1),
656 & mumps_tps_arr(ithread)%LIW,
657 & mumps_tps_arr(ithread)%LRLU,
658 & mumps_tps_arr(ithread)%LRLUS,
659 & mumps_tps_arr(ithread)%IPTRLU,
660 & mumps_tps_arr(ithread)%IWPOSCB,
661 & mumps_tps_arr(ithread)%LA, keep,keep8, .false.
665 IF (is_dynamic_cb)
THEN
668 & keep(405).EQ.1, keep8 )
671 pdest = istchk + 6 + keep(ixsz)
672 ncbson = lstk - nelim
673 ptrcol = istchk + hs + nrows + npivs + nelim
674 DO islave = 0, nslson-1
677 & keep, keep8, ison, step, n, slavef,
678 & istep_to_iniv2, tab_pos_in_pere,
681 & trow_size, first_index )
682 shift_index = first_index - 1
683 indx = ptrcol + shift_index
685 & bufr, lbufr, lbufr_bytes,
686 & inode, ison, nslaves, idummy,
687 & nfront, nass1, nfs4father,
688 & trow_size, iw( indx ),
690 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
691 & lrlus, n, iw, liw, a, la,
692 & ptrist, ptlust, ptrfac, ptrast, step,
693 & pimaster, pamaster, nstk_s,
comp,
694 & info(1), info(2), myid, comm, perm, ipool, lpool,
695 & leaf, nbfin, icntl, keep, keep8, dkeep, root,
696 & opassw, opeliw, itloc, rhs_mumps, fils, dad,
698 & intarr, dblarr, nd, frere,
699 & nelt+1, nelt, frt_ptr, frt_elt,
701 & istep_to_iniv2, tab_pos_in_pere, lrgroups
703 IF ( info(1) .LT. 0 )
GOTO 500
707 IF (pimaster(step(ison)).GT.0)
THEN
710 ptrcol = pimaster(step(ison)) + hs + nrows + npivs + nelim
711 pdest = pimaster(step(ison)) + 6 + keep(ixsz)
713 & nass1, nfs4father,ison, myid,
714 & izero, idummy, iw(ptrcol), ncbson,
715 & comm, ierr, iw(pdest), nslson,
717 & keep,keep8, step, n,
718 & istep_to_iniv2, tab_pos_in_pere
723 message_received = .false.
725 & blocking, set_irecv, message_received,
726 & mpi_any_source, mpi_any_tag,
728 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
729 & iwpos, iwposcb, iptrlu,
730 & lrlu, lrlus, n, iw, liw, a, la,
731 & ptrist, ptlust, ptrfac,
732 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
733 & info(1), info(2), comm,
735 & ipool, lpool, leaf,
736 & nbfin, myid, slavef,
737 & root, opassw, opeliw, itloc, rhs_mumps,
738 & fils, dad, ptrarw, ptraiw,
739 & intarr, dblarr, icntl, keep, keep8,dkeep, nd, frere,
740 & nelt+1, nelt, frt_ptr, frt_elt,
741 & istep_to_iniv2, tab_pos_in_pere, .true., lrgroups )
742 IF ( info(1) .LT. 0 )
GOTO 500
745 IF (ierr .EQ. -2)
GOTO 290
746 IF (ierr .EQ. -3)
GOTO 295
749 ison = frere(step(ison))
752 DO iell=elbeg,elbeg+numelt-1
755 j28= ptraiw(elti+1)-1
757 size_elti8 = j28 - j18 + 1_8
760 IF (keep(50).EQ.0)
THEN
761 ainput8 = aii8 + ii8 - j18
762 ict12 = poselt + int(i-1,8) * nfront8
764 apos2 = ict12 + int(intarr(jj8) - 1,8)
765 a(apos2) = a(apos2) + dblarr(ainput8)
766 ainput8 = ainput8 + size_elti8
769 ict12 = poselt + int(- nfront + i - 1,8)
770 ict21 = poselt + int(i-1,8)*nfront8 - 1_8
774 apos2 = ict12 + int(j,8)*nfront8
776 apos2 = ict21 + int(j,8)
778 a(apos2) = a(apos2) + dblarr(aii8)
784 IF (keep(253).GT.0)
THEN
785 poselt = ptrast(step(inode))
787 ijrow = pos_first_numorg
789 IF (keep(50).EQ.0)
THEN
792 & int(ijrow-1,8) * nfront8 +
793 & int(nfront-keep(253)+j253-1,8)
794 a(apos) = a(apos) + rhs_mumps( (j253-1)*keep(254)+ibrot )
799 & int(nfront-keep(253)+j253-1,8) * nfront8 +
801 a(apos) = a(apos) + rhs_mumps( (j253-1)*keep(254)+ibrot )
808 IF (parpiv_t1.NE.0.AND.(.NOT.son_level2))
THEN
809 ioldps = ptlust(step(inode))
813 & nfront, nass1, lr_activated, parpiv_t1, nass)
821 &
' FAILURE IN INTEGER ALLOCATION DURING DMUMPS_ASM_NIV1_ELT'
827 &
' FAILURE, SEND BUFFER TOO SMALL DURING DMUMPS_ASM_NIV1_ELT'
830 lreq = ncbson + 6+nslson+keep(ixsz)
831 info(2) = lreq * keep( 34 )
836 &
' FAILURE, RECV BUFFER TOO SMALL DURING DMUMPS_ASM_NIV1_ELT'
839 lreq = ncbson + 6+nslson+keep(ixsz)
840 info(2) = lreq * keep( 34 )
843 IF (info(1).EQ.-13)
THEN
845 WRITE( lp, * )
' FAILURE IN INTEGER',
846 &
' DYNAMIC ALLOCATION DURING DMUMPS_ASM_NIV1_ELT'
851 IF ( keep(405) .EQ. 0 )
THEN
858 & NELT, FRT_PTR, FRT_ELT,
859 & N, INODE, IW, LIW, A, LA, INFO,
860 & ND, FILS, FRERE, DAD,
862 & ISTEP_TO_INIV2, TAB_POS_IN_PERE,
864 & OPASSW, OPELIW, PTRIST, PTLUST, PTRFAC,
865 & PTRAST, STEP, PIMASTER, PAMASTER, PTRARW, NSTK_S,
866 & PTRAIW, ITLOC, RHS_MUMPS, NSTEPS,
867 & COMP, LRLU, IPTRLU, IWPOS, IWPOSCB, POSFAC, LRLUS,
868 & ICNTL, KEEP, KEEP8,DKEEP,INTARR,LINTARR,DBLARR,LDBLARR,
869 & PROCNODE_STEPS, SLAVEF, COMM,MYID,
870 & BUFR, LBUFR, LBUFR_BYTES, NBFIN, LEAF, IPOOL, LPOOL,
886 TYPE (DMUMPS_ROOT_STRUC) :: root
887 INTEGER COMM_LOAD, ASS_IRECV
888 INTEGER N,LIW,NSTEPS, NBFIN
890 INTEGER KEEP(500), ICNTL(60)
891 INTEGER(8) KEEP8(150)
892 DOUBLE PRECISION DKEEP(230)
893 INTEGER(8) :: LRLUS, LRLU, IPTRLU, POSFAC, LA
894 INTEGER,
INTENT(INOUT) :: INFO(2)
895 INTEGER INODE, MAXFRW, LPOOL, LEAF,
896 & IWPOS, IWPOSCB, COMP, SLAVEF
897 DOUBLE PRECISION,
TARGET :: A(LA)
898 INTEGER,
intent(in) :: LRGROUPS(N)
899 DOUBLE PRECISION OPASSW, OPELIW
900 INTEGER,
DIMENSION(0:SLAVEF - 1) :: MEM_DISTRIB
902 INTEGER(8) :: PTRAST(KEEP(28))
903 INTEGER(8) :: PTRFAC(KEEP(28))
904 INTEGER(8) :: PAMASTER(KEEP(28))
905 INTEGER(8),
INTENT(IN) :: PTRARW(NELT+1), PTRAIW(NELT+1)
906 INTEGER IW(LIW), ITLOC(N+KEEP(253)),
908 & fils(n), frere(keep(28)), dad(keep(28)),
909 & ptrist(keep(28)), ptlust(keep(28)),
911 & pimaster(keep(28)),
912 & nstk_s(keep(28)), perm(n)
913 DOUBLE PRECISION :: RHS_MUMPS(KEEP(255))
914 INTEGER CAND(SLAVEF+1, max(1,KEEP(56)))
915 INTEGER ISTEP_TO_INIV2(KEEP(71)),
916 & tab_pos_in_pere(slavef+2,max(1,keep(56)))
917 INTEGER FRT_PTR(N+1), FRT_ELT(NELT)
918 INTEGER(8),
INTENT(IN) :: LINTARR,LDBLARR
919 DOUBLE PRECISION DBLARR(LDBLARR)
920 INTEGER INTARR(LINTARR)
923 INTEGER LBUFR, LBUFR_BYTES
924 INTEGER PROCNODE_STEPS(KEEP(28))
925 INTEGER BUFR( LBUFR )
926 include
'mumps_headers.h'
929 INTEGER :: (MPI_STATUS_SIZE)
931 INTEGER LP, HS, HF, HF_OLD, NCBSON, NSLAVES_OLD
934 INTEGER IN,NUMSTK,NASS,ISON,IFSON,NASS1,IELL
935 INTEGER :: IBC_SOURCE
936 DOUBLE PRECISION,
DIMENSION(:),
POINTER :: SON_A
937 INTEGER NFS4FATHER, ESTIM_NFS4FATHER_ATSON
938 INTEGER NFRONT,NFRONT_EFF,ISTCHK,ISTCHK_CB_RIGHT,LSTK,LREQ
942 INTEGER NBPANELS_L, NBPANELS_U
943 LOGICAL PACKED_CB, IS_CB_LR
945 LOGICAL :: IS_DYNAMIC_CB
946 INTEGER(8) :: DYN_SIZE
949 INTEGER :: K1, K2, KK, KK1
951 INTEGER(8) :: AII8, AINPUT8, II8
952 INTEGER(8) :: J18,J28,
953 INTEGER(8) :: LAPOS2, JJ2, JJ3
954 INTEGER(8) :: NFRONT8, POSELT, , LDAFS8,
955 & iachk, ict12, ict21
956 INTEGER(8) APOS, APOS2
957#if ! defined(ZERO_TRIANGLE)
962 INTEGER NELIM,NPIVS,NCOLS,NROWS,
964 INTEGER LDAFS, , IJROW, IBROT
965 INTEGER Pos_First_NUMORG,NBCOL,NUMORG,IOLDPS
966 INTEGER NSLAVES, NSLSON
967 INTEGER NBLIG, PTRCOL, , PDEST
971 INTEGER(8) :: SIZE_ELTI8
974 LOGICAL SAME_PROC, NIV1, SON_LEVEL2
975 LOGICAL BLOCKING, SET_IRECV, MESSAGE_RECEIVED
976 INTEGER TROW_SIZE, INDX, FIRST_INDEX, SHIFT_INDEX
978 LOGICAL COMPRESS_PANEL, LR_ACTIVATED, COMPRESS_CB,
979 & oocwrite_compatible_with_blr
982 parameter( izero = 0 )
983 INTEGER MUMPS_PROCNODE, MUMPS_TYPENODE, MUMPS_TYPESPLIT
984 EXTERNAL mumps_procnode, mumps_typenode, mumps_typesplit
985 DOUBLE PRECISION ZERO
986 DOUBLE PRECISION RZERO
987 PARAMETER( RZERO = 0.0d0 )
988 parameter( zero = 0.0d0 )
989 logical :: force_cand
991 INTEGER(8) :: APOSMAX
992 DOUBLE PRECISION MAXARR
993 INTEGER INIV2, SIZE_TMP_SLAVES_LIST, allocok
994 INTEGER NCB_SPLIT, SIZE_LIST_SPLIT, NBSPLIT,
995 & NUMORG_SPLIT, TYPESPLIT
996 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: TMP_SLAVES_LIST, COPY_CAND
997 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: SONROWS_PER_ROW
998 INTEGER,
POINTER,
DIMENSION(:) :: BEGS_BLR
999 INTEGER :: NB_BLR, NPARTSCB, NPARTSASS, MAXI_CLUSTER,
1001 INTEGER :: NMB_OF_CAND, NMB_OF_CAND_ORIG
1002 LOGICAL :: IS_ofType5or6, SPLIT_MAP_RESTART
1006 lpok = ((lp.GT.0).AND.(icntl(4).GE.1))
1007 is_oftype5or6 = .false.
1012 keep(429) = keep(429)+1
1013 numelt = frt_ptr(inode+1) - frt_ptr(inode)
1014 IF ( numelt .NE. 0 )
THEN
1015 elbeg = frt_ptr(inode)
1029 DO WHILE (ison .GT. 0)
1031 IF ( keep(48)==5 .AND.
1032 & mumps_typenode(procnode_steps(step(ison)),
1033 & keep(199)) .EQ. 1)
THEN
1035 & max(ncbson_max,iw(pimaster(step(ison))+keep(ixsz)))
1037 nass = nass + iw(pimaster(step(ison)) + 1 + keep(ixsz))
1038 ison = frere(step(ison))
1040 nfront = nd(step(inode)) + nass + keep(253)
1041 nass1 = nass + numorg
1042 ncb = nfront - nass1
1044 & keep(489), keep(490), keep(491), keep(492),
1045 & keep(20), keep(60), dad(step(inode)), keep(38),
1046 & lrstatus, n, lrgroups)
1047 compress_panel = (lrstatus.GE.2)
1048 compress_cb = ((lrstatus.EQ.1).OR.
1050 lr_activated = (lrstatus.GT.0)
1051 IF (compress_cb.AND.(.NOT.compress_panel))
THEN
1052 compress_panel = .true.
1055 oocwrite_compatible_with_blr =
1056 & ( .NOT.lr_activated.OR.(.NOT.compress_panel).OR.
1059 IF((keep(24).eq.0).or.(keep(24).eq.1))
then
1062 force_cand=(mod(keep(24),2).eq.0)
1066 is_oftype5or6 = (typesplit.EQ.5 .OR. typesplit.EQ.6)
1067 istchk = pimaster(step(ifson))
1068 pdest = istchk + 6 + keep(ixsz)
1069 nslson = iw(istchk + keep(ixsz) + 5)
1070 split_map_restart = .false.
1071 IF (force_cand)
THEN
1072 iniv2 = istep_to_iniv2( step( inode ))
1073 nmb_of_cand = cand( slavef+1, iniv2 )
1074 nmb_of_cand_orig = nmb_of_cand
1075 size_tmp_slaves_list = nmb_of_cand
1076 IF (is_oftype5or6)
THEN
1077 DO i=nmb_of_cand+1,slavef
1078 IF ( cand( i, iniv2 ).LT.0)
EXIT
1079 nmb_of_cand = nmb_of_cand +1
1081 size_tmp_slaves_list = nslson-1
1082 WRITE(6,*)
"NMB_OF_CAND, SIZE_TMP_SLAVES_LIST ",
1083 & nmb_of_cand, size_tmp_slaves_list
1084 IF (inode.EQ.-999999)
THEN
1085 split_map_restart = .true.
1088 IF (is_oftype5or6.AND.split_map_restart)
THEN
1090 is_oftype5or6 = .false.
1091 size_tmp_slaves_list = nmb_of_cand
1092 cand(slavef+1, iniv2) = size_tmp_slaves_list
1096 size_tmp_slaves_list = slavef - 1
1097 nmb_of_cand = slavef - 1
1098 nmb_of_cand_orig = slavef - 1
1100 ALLOCATE(tmp_slaves_list(size_tmp_slaves_list),stat=allocok)
1101 IF (allocok > 0 )
THEN
1104 typesplit = mumps_typesplit(procnode_steps(step(inode)),
1106 IF ( (typesplit.EQ.4)
1107 & .OR.(typesplit.EQ.5).OR.(typesplit.EQ.6)
1109 IF (typesplit.EQ.4)
THEN
1110 ALLOCATE(copy_cand(slavef+1),stat=allocok)
1111 IF (allocok > 0 )
THEN
1115 & inode, step, n, slavef,
1116 & procnode_steps, keep, dad, fils,
1117 & cand(1,iniv2), icntl, copy_cand,
1118 & nbsplit, numorg_split, tmp_slaves_list(1),
1119 & size_tmp_slaves_list
1121 ncb_split = ncb-numorg_split
1122 size_list_split = size_tmp_slaves_list - nbsplit
1125 & mem_distrib(0), ncb_split, nfront, nslaves,
1126 & tab_pos_in_pere(1,iniv2),
1127 & tmp_slaves_list(nbsplit+1),
1128 & size_list_split,inode
1130 DEALLOCATE (copy_cand)
1132 & inode, step, n, slavef, nbsplit, ncb,
1133 & procnode_steps, keep, dad, fils,
1135 & tab_pos_in_pere(1,iniv2),
1138 IF (split_map_restart)
THEN
1139 is_oftype5or6 = .true.
1140 typesplit = mumps_typesplit(procnode_steps(step(inode)),
1145 istchk = pimaster(step(ifson))
1146 pdest = istchk + 6 + keep(ixsz)
1147 nslson = iw(istchk + keep(ixsz) + 5)
1148 IF (keep(376) .EQ. 1)
THEN
1149 nfront = iw( pimaster(step(ifson)) + keep(ixsz))
1152 & inode, typesplit, ifson,
1153 & cand(1,iniv2), nmb_of_cand_orig,
1154 & iw(pdest), nslson,
1156 & procnode_steps, keep, dad, fils,
1157 & icntl, istep_to_iniv2, iniv2,
1158 & tab_pos_in_pere, nslaves,
1160 & size_tmp_slaves_list
1165 & icntl, cand(1,iniv2),
1166 & mem_distrib(0), ncb, nfront, nslaves,
1167 & tab_pos_in_pere(1,iniv2),
1169 & size_tmp_slaves_list,inode
1172 hf = nslaves + 6 + keep(ixsz)
1174 IF (keep(201).EQ.1.AND.oocwrite_compatible_with_blr)
THEN
1176 & nbpanels_l, nbpanels_u, lreq_ooc)
1178 lreq = hf + 2 * nfront + lreq_ooc
1179 IF ((iwpos + lreq -1) .GT. iwposcb)
THEN
1183 & iwpos, iwposcb, ptrist, ptrast,
1184 & step, pimaster, pamaster,
1186 & comp, dkeep(97), myid, slavef,
1187 & procnode_steps, dad)
1188 IF (lrlu .NE. lrlus)
THEN
1190 WRITE(lp, * )
'PB compress DMUMPS_FAC_ASM_NIV2_ELT',
1191 &
'LRLU,LRLUS=',lrlu,lrlus
1195 IF ((iwpos + lreq -1) .GT. iwposcb)
GOTO 270
1198 iwpos = iwpos + lreq
1200 ALLOCATE(sonrows_per_row(nfront-nass1), stat=allocok)
1201 IF (allocok > 0)
THEN
1205 & numelt, frt_elt(elbeg),
1206 & myid, inode, n, ioldps, hf,
1207 & nfront, nfront_eff, perm,
1208 & nass1, nass, numstk, numorg, iwposcb, iwpos,
1209 & ifson, step, pimaster, ptrist, ptraiw, nelt, iw, liw,
1210 & intarr, lintarr, itloc, fils, frere,
1211 & keep, son_level2, niv1, info(1),
1212 & dad,procnode_steps, slavef,
1213 & frt_ptr, frt_elt, pos_first_numorg,
1214 & sonrows_per_row, nfront - nass1)
1215 IF (info(1).LT.0)
GOTO 250
1216 IF ( nfront .NE. nfront_eff )
THEN
1218 & (typesplit.EQ.5) .OR. (typesplit.EQ.6))
THEN
1219 WRITE(6,*)
' Internal error 1 in fac_ass due to splitting ',
1220 &
' INODE, NFRONT, NFRONT_EFF =', inode, nfront, nfront_eff
1221 WRITE(6,*)
' SPLITTING NOT YET READY FOR THAT'
1224 IF (nfront.GT.nfront_eff)
THEN
1225 ncb = nfront_eff - nass1
1226 nslaves_old = nslaves
1228 IF (typesplit.EQ.4)
THEN
1229 ALLOCATE(copy_cand(slavef+1),stat=allocok)
1230 IF (allocok > 0 )
THEN
1234 & inode, step, n, slavef,
1235 & procnode_steps, keep, dad, fils,
1236 & cand(1,iniv2), icntl, copy_cand,
1237 & nbsplit, numorg_split, tmp_slaves_list(1),
1238 & size_tmp_slaves_list
1240 ncb_split = ncb-numorg_split
1241 size_list_split = size_tmp_slaves_list - nbsplit
1243 & slavef, keep,keep8,
1245 & mem_distrib(0), ncb_split, nfront_eff, nslaves,
1246 & tab_pos_in_pere(1,iniv2),
1247 & tmp_slaves_list(nbsplit+1),
1248 & size_list_split,inode
1250 DEALLOCATE (copy_cand)
1252 & inode, step, n, slavef, nbsplit, ncb,
1253 & procnode_steps, keep, dad, fils,
1255 & tab_pos_in_pere(1,iniv2),
1260 & slavef, keep, keep8, icntl,
1262 & mem_distrib(0), ncb, nfront_eff, nslaves,
1263 & tab_pos_in_pere(1,iniv2),
1264 & tmp_slaves_list, size_tmp_slaves_list,inode
1267 hf = nslaves + 6 + keep(ixsz)
1268 iwpos = iwpos - ((2*nfront)-(2*nfront_eff)) -
1269 & (nslaves_old - nslaves)
1270 IF (nslaves_old .NE. nslaves)
THEN
1271 IF (nslaves_old > nslaves)
THEN
1272 DO kk=0,2*nfront_eff-1
1273 iw(ioldps+hf+kk)=iw(ioldps+hf_old+kk)
1276 IF (iwpos - 1 > iwposcb )
GOTO 270
1277 DO kk=2*nfront_eff-1, 0, -1
1278 iw(ioldps+hf+kk) = iw(ioldps+hf_old+kk)
1283 lreq = hf + 2 * nfront + lreq_ooc
1286 WRITE(lp,*)
' INTERNAL ERROR 2 during ass_niv2'
1291 nfront8=int(nfront,8)
1292 IF (keep(201).EQ.1.AND.keep(50).NE.1.AND.
1293 & oocwrite_compatible_with_blr)
THEN
1295 & nbpanels_l, nbpanels_u, nass1,
1296 & ioldps + hf + 2 * nfront, iw, liw)
1298 maxfrw = max0(maxfrw, nfront)
1299 ptlust(step(inode)) = ioldps
1300 iw(ioldps+keep(ixsz)) = nfront
1301 iw(ioldps + 1+keep(ixsz)) = 0
1302 iw(ioldps + 2+keep(ixsz)) = -nass1
1303 iw(ioldps + 3+keep(ixsz)) = -nass1
1304 iw(ioldps + 4+keep(ixsz)) = step(inode)
1305 iw(ioldps+5+keep(ixsz)) = nslaves
1306 iw(ioldps+6+keep(ixsz):ioldps+5+nslaves+keep(ixsz))=
1307 & tmp_slaves_list(1:nslaves)
1308 estim_nfs4father_atson = -9999
1309 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1310 ifath = dad( step( inode) )
1311 IF (ifath.NE.0)
THEN
1312 IF (compress_cb.AND.
1313 & mumps_typenode(procnode_steps(step(ifath)),keep(199))
1315 ioldps = ptlust(step(inode))
1317 & n, inode, ifath, fils, perm, keep,
1318 & ioldps, hf, iw, liw, nfront, nass1,
1319 & estim_nfs4father_atson
1325 & tab_pos_in_pere(1,istep_to_iniv2(step(inode))),
1326 & nass1, keep, keep8, iw(ioldps+6+keep(ixsz)), nslaves,inode)
1327 IF(keep(86).EQ.1)
THEN
1328 IF(mod(keep(24),2).eq.0)
THEN
1330 & cand(slavef+1,iniv2),
1332 & tab_pos_in_pere(1,istep_to_iniv2(step(inode))),
1333 & nass1, keep,keep8, tmp_slaves_list,
1335 ELSEIF((keep(24).EQ.0).OR.(keep(24).EQ.1))
THEN
1339 & tab_pos_in_pere(1,istep_to_iniv2(step(inode))),
1340 & nass1, keep,keep8, tmp_slaves_list,
1344 DEALLOCATE(tmp_slaves_list)
1345 IF (keep(50).EQ.0)
THEN
1346 laell8 = int(nass1,8) * nfront8
1350 laell8 = int(nass1,8)*int(nass1,8)
1351 IF(keep(219).NE.0.AND.keep(50) .EQ. 2)
1352 & laell8 = laell8+int(nass1,8)
1354 ldafs8 = int(nass1,8)
1357 & (0, laell8, .false.,
1358 & keep(1), keep8(1),
1360 & lrlu,iptrlu,iwpos,iwposcb,
1362 & step, pimaster,pamaster,lrlus,
1363 & keep(ixsz), comp, dkeep(97), myid,
1364 & slavef, procnode_steps, dad,
1366 IF (info(1).LT.0)
GOTO 490
1367 lrlu = lrlu - laell8
1368 lrlus = lrlus - laell8
1369 keep8(67) =
min(lrlus, keep8(67))
1370 keep8(69) = keep8(69) + laell8
1371 keep8(68) = max(keep8(69), keep8(68))
1373 ptrast(step(inode)) = poselt
1374 ptrfac(step(inode)) = poselt
1375 posfac = posfac + laell8
1376 iw(ioldps+xxi) = lreq
1379 iw(ioldps+xxs) = -9999
1380 iw(ioldps+xxn) = -99999
1381 iw(ioldps+xxp) = -99999
1382 iw(ioldps+xxa) = -99999
1383 iw(ioldps+xxf) = -99999
1384 iw(ioldps+xxlr)= lrstatus
1385 iw(ioldps+xxg) = memnotpinned
1388 posel1 = poselt - ldafs8
1389#if defined(ZERO_TRIANGLE)
1390 lapos2 = poselt + laell8 - 1_8
1391 a(poselt:lapos2) = zero
1393 IF ( keep(50) .eq. 0 .OR. ldafs .lt. keep(63) )
THEN
1394 lapos2 = poselt + laell8 - 1_8
1401 DO jj8 = poselt, lapos2
1406 topdiag = max(keep(7), keep(8))-1
1407 IF (lr_activated)
THEN
1409 CALL get_cut(iw(ioldps+hf:ioldps+hf+nfront-1), nass1,
1410 & 0, lrgroups, npartscb,
1411 & npartsass, begs_blr)
1412 nb_blr = npartsass + npartscb
1414 DEALLOCATE(begs_blr)
1416 minsize = int(ibcksz2 / 2)
1417 topdiag = max(2*minsize + maxi_cluster-1, topdiag)
1427 DO jj8 = 0_8, int(ldafs-1,8)
1428 apos = poselt + jj8 * int(ldafs,8)
1429 jj3 =
min( int(ldafs,8) - 1_8, jj8 + topdiag )
1430 a(apos:apos+jj3) = zero
1433 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1434 aposmax = poselt + int(nass1,8)*int(nass1,8)
1435 a(aposmax:aposmax+int(ldafs-1,8))=zero
1439 IF ((numstk.NE.0).AND.(nass.NE.0))
THEN
1441 DO 220 iell = 1, numstk
1442 istchk = pimaster(step(ison))
1443 nelim = iw(istchk + keep(ixsz) + 1)
1444 IF (nelim.EQ.0)
GOTO 210
1445 lstk = iw(istchk + keep(ixsz))
1446 npivs = iw(istchk + 3+keep(ixsz))
1447 IF (npivs.LT.0) npivs=0
1448 nslson = iw(istchk + 5+keep(ixsz))
1449 hs = 6 + nslson + keep(ixsz)
1450 ncols = npivs + lstk
1451 same_proc = (istchk.LT.iwpos)
1452 IF ( same_proc )
THEN
1453 istchk_cb_right=ptrist(step(ison))
1455 istchk_cb_right=istchk
1457 son_xxs = iw(istchk_cb_right + xxs)
1458 packed_cb = ( son_xxs .EQ. s_cb1comp )
1459 IF (.NOT.same_proc)
THEN
1460 nrows = iw(istchk + keep(ixsz) + 2)
1464 IF (keep(50).EQ.0)
THEN
1466 lcb = int(nelim,8)*int(lstk,8)
1468 IF (nslson.EQ.0)
THEN
1470 is_cb_lr = iw(istchk_cb_right+xxlr).EQ. 1 .OR.
1471 & iw(istchk_cb_right+xxlr).EQ. 3
1484 lcb = (int(nelim,8)*int(nelim+1,8))/2_8
1486 lcb = int(lda_son,8)*int(nelim,8)
1489 IF (keep(50) .EQ. 0)
THEN
1490 opassw = opassw + dble(lcb)
1492 opassw = opassw + int(nelim,8)*int(nelim+1,8)/2_8
1496 & istchk_cb_right+xxd+1))
1497 IF ( is_dynamic_cb )
THEN
1498 CALL mumps_geti8(dyn_size, iw(istchk_cb_right+xxd))
1503 iachk = pamaster(step(ison))
1506 k1 = istchk + hs + nrows + npivs
1508 IF (keep(50).eq.0)
THEN
1509 IF (is_oftype5or6)
THEN
1511 DO jj8 = 1_8, int(nelim,8)*int(lstk,8)
1512 a(apos+jj8-1_8) = a(apos+jj8-1_8) + son_a(iachk+jj8-1_8)
1516 apos = posel1 + int(iw(kk),8) * ldafs8
1517 DO 160 kk1 = 1, lstk
1518 jj2 = apos + int(iw(k1 + kk1 - 1),8) - 1_8
1519 a(jj2) = a(jj2) + son_a(iachk + int(kk1 - 1,8))
1521 iachk = iachk + int(lstk,8)
1525 IF (lcb .GT. 0)
THEN
1527 & poselt, ldafs, nass1,
1529 & iw( k1 ), nelim, nelim, etatass,
1535 210 ison = frere(step(ison))
1538 aposmax = poselt + int(nass1,8)*int(nass1,8)
1539 IF (keep(219).NE.0)
THEN
1540 IF (keep(50).EQ.2)
THEN
1541 a( aposmax: aposmax+int(nass1-1,8))=zero
1544 DO iell=elbeg,elbeg+numelt-1
1545 elti = frt_elt(iell)
1547 j28= ptraiw(elti+1) - 1_8
1549 size_elti8 = j28 - j18 + 1_8
1552 IF (keep(50).EQ.0)
THEN
1553 IF (i.LE.nass1)
THEN
1554 ainput8 = aii8 + ii8 - j18
1555 ict12 = poselt + int(i-1,8) * ldafs8
1557 apos2 = ict12 + int(intarr(jj8) - 1,8)
1558 a(apos2) = a(apos2) + dblarr(ainput8)
1559 ainput8 = ainput8 + size_elti8
1563 ict12 = poselt - ldafs8 + int(i,8) - 1_8
1564 ict21 = poselt + int(i-1,8)*ldafs8 - 1_8
1565 IF ( i .GT. nass1 )
THEN
1566 IF (keep(219).NE.0 .AND. keep(50).EQ.2)
THEN
1570 IF (j.LE.nass1)
THEN
1571 a(aposmax+int(j-1,8))=
1572 & max(dble(a(aposmax+int(j-1,8))),
1573 & abs(dblarr(ainput8)))
1578 aii8 = aii8 + j28 - ii8 + 1_8
1581 IF (keep(219).NE.0)
THEN
1586 IF ( j .LE. nass1)
THEN
1588 apos2 = ict12 + int(j,8)*ldafs8
1590 apos2 = ict21 + int(j,8)
1592 a(apos2) = a(apos2) + dblarr(aii8)
1593 ELSE IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1594 maxarr = max(maxarr,abs(dblarr(aii8)))
1598 IF(keep(219).NE.0.AND.keep(50) .EQ. 2)
THEN
1599 a(aposmax+int(i-1,8)) =
1600 & max( maxarr, dble(a(aposmax+int(i-1,8))))
1606 IF (keep(253).GT.0)
THEN
1607 poselt = ptrast(step(inode))
1609 ijrow = pos_first_numorg
1611 IF (keep(50).EQ.0)
THEN
1612 DO j253 = 1, keep(253)
1614 & int(ijrow-1,8) * int(ldafs,8) +
1615 & int(ldafs-keep(253)+j253-1,8)
1616 a(apos) = a(apos) + rhs_mumps( (j253-1)*keep(254)+ibrot )
1623 ptrcol = ioldps + hf + nfront
1624 ptrrow = ioldps + hf + nass1
1625 pdest = ioldps + 6 + keep(ixsz)
1627 DO islave = 1, nslaves
1629 & keep,keep8, inode, step, n, slavef,
1630 & istep_to_iniv2, tab_pos_in_pere,
1633 & nblig, first_index )
1634 shift_index = first_index - 1
1636 DO WHILE (ierr .EQ.-1)
1637 IF ( keep(50) .eq. 0 )
THEN
1640 & sum(sonrows_per_row(first_index:first_index+nblig-1)),
1641 & nblig, iw(ptrrow), nbcol, iw(ptrcol), nass1,
1644 & estim_nfs4father_atson,
1645 & iw(pdest), ibc_source, nfront, comm, keep, ierr
1649 nbcol = nass1+shift_index+nblig
1651 & sum(sonrows_per_row(first_index:first_index+nblig-1)),
1652 & nblig, iw(ptrrow), nbcol, iw(ptrcol), nass1,
1654 & iw( ptlust(step(inode))+6+keep(ixsz)+islave),
1656 & estim_nfs4father_atson,
1657 & iw(pdest), ibc_source, nfront, comm, keep, ierr
1661 IF (ierr.EQ.-1)
THEN
1664 message_received = .false.
1666 & blocking, set_irecv, message_received,
1667 & mpi_any_source, mpi_any_tag,
1668 & status, bufr, lbufr,
1670 & procnode_steps, posfac, iwpos, iwposcb, iptrlu,
1671 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
1673 & ptrast, step, pimaster, pamaster, nstk_s, comp, info(1),
1676 & ipool, lpool, leaf, nbfin, myid, slavef,
1677 & root, opassw, opeliw, itloc, rhs_mumps,
1678 & fils, dad, ptrarw, ptraiw,
1679 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
1680 & nelt+1, nelt, frt_ptr, frt_elt,
1681 & istep_to_iniv2, tab_pos_in_pere, .true.
1684 IF ( info(1) .LT. 0 )
GOTO 500
1685 IF (message_received)
THEN
1686 ioldps = ptlust(step(inode))
1687 ptrcol = ioldps + hf + nfront
1688 ptrrow = ioldps + hf + nass1 + shift_index
1692 IF (ierr .EQ. -2)
GOTO 300
1693 IF (ierr .EQ. -3)
GOTO 305
1694 ptrrow = ptrrow + nblig
1697 DEALLOCATE(sonrows_per_row)
1698 IF (numstk.EQ.0)
GOTO 500
1701 istchk = pimaster(step(ison))
1702 nelim = iw(istchk + 1 + keep(ixsz))
1703 lstk = iw(istchk + keep(ixsz))
1704 npivs = iw(istchk + 3 + keep(ixsz))
1705 IF ( npivs .LT. 0 ) npivs = 0
1706 nslson = iw(istchk + 5 + keep(ixsz))
1707 hs = 6 + nslson + keep(ixsz)
1708 ncols = npivs + lstk
1709 same_proc = (istchk.LT.iwpos)
1710 IF (.NOT.same_proc)
THEN
1711 nrows = iw(istchk + 2 + keep(ixsz) )
1715 pdest = istchk + 6 + keep(ixsz)
1716 ncbson = lstk - nelim
1717 ptrcol = istchk + hs + nrows + npivs + nelim
1718 IF (keep(219).NE.0.AND.keep(50).EQ.2)
THEN
1721 IF(iw(ptrcol+i) .GT. nass1)
THEN
1726 nfs4father = nfs4father + nelim
1730 IF (nslson.EQ.0)
THEN
1732 pdest1(1) = mumps_procnode(procnode_steps(step(ison)),
1734 IF (pdest1(1).EQ.myid)
THEN
1736 & bufr, lbufr, lbufr_bytes,
1737 & inode, ison, nslaves,
1738 & iw( ptlust(step(inode)) + 6 +keep(ixsz)),
1739 & nfront, nass1, nfs4father, ncbson, iw( ptrcol ),
1741 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
1742 & lrlus, n, iw, liw, a, la,
1743 & ptrist, ptlust, ptrfac, ptrast, step,
1744 & pimaster, pamaster, nstk_s, comp,
1745 & info(1), info(2), myid, comm, perm,
1746 & ipool, lpool, leaf,
1747 & nbfin, icntl, keep, keep8, dkeep, root,
1749 & itloc, rhs_mumps, fils, dad,
1750 & ptrarw, ptraiw, intarr, dblarr, nd, frere, nelt+1, nelt,
1752 & istep_to_iniv2, tab_pos_in_pere,
1754 IF ( info(1) .LT. 0 )
GOTO 500
1757 DO WHILE (ierr.EQ.-1)
1758 ptrcol = pimaster(step(ison)) + hs + nrows + npivs + nelim
1760 & inode, nfront,nass1,nfs4father,
1762 & nslaves, iw( ptlust(step(inode)) + 6 +keep(ixsz)),
1763 & iw(ptrcol), ncbson,
1764 & comm, ierr, pdest1, nslson, slavef,
1765 & keep,keep8, step, n,
1766 & istep_to_iniv2, tab_pos_in_pere
1768 IF (ierr.EQ.-1)
THEN
1771 message_received = .false.
1773 & blocking, set_irecv, message_received,
1774 & mpi_any_source, mpi_any_tag,
1775 & status, bufr, lbufr, lbufr_bytes,
1776 & procnode_steps, posfac, iwpos, iwposcb, iptrlu,
1777 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
1779 & ptrast, step, pimaster, pamaster, nstk_s, comp, info(1),
1782 & ipool, lpool, leaf, nbfin, myid, slavef,
1783 & root,opassw, opeliw, itloc, rhs_mumps, fils, dad,
1785 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
1786 & nelt+1, nelt, frt_ptr, frt_elt,
1787 & istep_to_iniv2, tab_pos_in_pere, .true.
1790 IF ( info(1) .LT. 0 )
GOTO 500
1793 IF (ierr .EQ. -2)
GOTO 290
1794 IF (ierr .EQ. -3)
GOTO 295
1797 IF (pimaster(step(ison)).GT.0)
THEN
1799 DO WHILE (ierr.EQ.-1)
1800 ptrcol = pimaster(step(ison)) + hs + nrows + npivs + nelim
1801 pdest = pimaster(step(ison)) + 6 + keep(ixsz)
1803 & inode, nfront, nass1, nfs4father,
1805 & nslaves, iw(ptlust(step(inode))+6+keep(ixsz)),
1806 & iw(ptrcol), ncbson,
1807 & comm, ierr, iw(pdest), nslson, slavef,
1808 & keep,keep8, step, n,
1809 & istep_to_iniv2, tab_pos_in_pere
1811 IF (ierr.EQ.-1)
THEN
1814 message_received = .false.
1816 & blocking, set_irecv, message_received,
1817 & mpi_any_source, mpi_any_tag,
1818 & status, bufr, lbufr,
1820 & procnode_steps, posfac, iwpos, iwposcb, iptrlu,
1821 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
1823 & ptrast, step, pimaster, pamaster, nstk_s, comp, info(1),
1826 & ipool, lpool, leaf, nbfin, myid, slavef,
1827 & root,opassw, opeliw, itloc, rhs_mumps,
1828 & fils, dad, ptrarw, ptraiw,
1829 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
1830 & nelt+1, nelt, frt_ptr, frt_elt,
1831 & istep_to_iniv2, tab_pos_in_pere, .true.
1834 IF ( info(1) .LT. 0 )
GOTO 500
1837 IF (ierr .EQ. -2)
GOTO 290
1838 IF (ierr .EQ. -3)
GOTO 295
1840 DO islave = 0, nslson-1
1841 IF (iw(pdest+islave).EQ.myid)
THEN
1843 & keep,keep8, ison, step, n, slavef,
1844 & istep_to_iniv2, tab_pos_in_pere,
1847 & trow_size, first_index )
1848 shift_index = first_index
1849 indx = ptrcol + shift_index
1851 & bufr, lbufr, lbufr_bytes,
1852 & inode, ison, nslaves,
1853 & iw( ptlust(step(inode))+6+keep(ixsz)),
1854 & nfront, nass1,nfs4father,
1855 & trow_size, iw( indx ),
1857 & slavef, posfac, iwpos, iwposcb, iptrlu, lrlu,
1858 & lrlus, n, iw, liw, a, la,
1859 & ptrist, ptlust, ptrfac, ptrast, step,
1860 & pimaster, pamaster, nstk_s, comp, info(1), info(2),
1861 & myid, comm, perm, ipool, lpool, leaf,
1862 & nbfin, icntl, keep,keep8,dkeep, root,
1863 & opassw, opeliw, itloc, rhs_mumps, fils, dad,
1864 & ptrarw, ptraiw, intarr, dblarr, nd, frere,
1865 & nelt+1, nelt, frt_ptr, frt_elt,
1867 & istep_to_iniv2, tab_pos_in_pere, lrgroups)
1868 IF ( info(1) .LT. 0 )
GOTO 500
1873 ison = frere(step(ison))
1877 IF (info(1).EQ.-13)
THEN
1880 &
' FAILURE IN INTEGER DYNAMIC ALLOCATION DURING
1881 & DMUMPS_FAC_ASM_NIV2_ELT'
1883 info(2) = numstk + 1
1888 WRITE( lp, * )
' FAILURE ALLOCATING COPY_CAND',
1889 &
' DURING DMUMPS_FAC_ASM_NIV2_ELT'
1896 WRITE( lp, * )
' FAILURE ALLOCATING TMP_SLAVES_LIST',
1897 &
' DURING DMUMPS_FAC_ASM_NIV2_ELT'
1900 info(2) = size_tmp_slaves_list
1907 &
' FAILURE IN INTEGER ALLOCATION DURING DMUMPS_ASM_NIV2_ELT'
1912 WRITE( lp, * )
' FAILURE ALLOCATING SONROWS_PER_ROW',
1913 &
' DURING DMUMPS_ASM_NIV2_ELT'
1916 info(2) = nfront-nass1
1921 &
' FAILURE, SEND BUFFER TOO SMALL (1) DURING DMUMPS_ASM_NIV2_ELT'
1924 lreq = ncbson + 6 + nslson+keep(ixsz)
1925 info(2) = lreq * keep( 34 )
1930 &
' FAILURE, RECV BUFFER TOO SMALL (1) DURING DMUMPS_ASM_NIV2_ELT'
1933 lreq = ncbson + 6 + nslson+keep(ixsz)
1934 info(2) = lreq * keep( 34 )
1939 &
' FAILURE, SEND BUFFER TOO SMALL (2)',
1940 &
' DURING DMUMPS_FAC_ASM_NIV2_ELT'
1943 lreq = nblig + nbcol + 4 + keep(ixsz)
1944 info(2) = lreq * keep( 34 )
1949 &
' FAILURE, RECV BUFFER TOO SMALL (2)',
1950 &
' DURING DMUMPS_FAC_ASM_NIV2_ELT'
1953 lreq = nblig + nbcol + 4 + keep(ixsz)
1954 info(2) = lreq * keep( 34 )