16 & inode, nelim_root, root,
18 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
19 & iwpos, iwposcb, iptrlu,
20 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
22 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
23 & iflag, ierror, comm,
24 & perm, ipool, lpool, leaf, nbfin, myid, slavef,
26 & opassw, opeliw, itloc, rhs_mumps,
27 & fils, dad, ptrarw, ptraiw,
28 & intarr,dblarr,icntl,keep,keep8,dkeep,nd,frere,
29 & lptrar, nelt, frtptr, frtelt,
30 & istep_to_iniv2, tab_pos_in_pere
36 TYPE (cmumps_root_struc) :: root
37 INTEGER keep(500), icntl( 60 )
40 INTEGER comm_load, ass_irecv
41 INTEGER inode, nelim_root
42 INTEGER lbufr, lbufr_bytes
44 INTEGER(8) :: la, posfac, iptrlu, lrlu, lrlus
45 INTEGER iwpos, iwposcb
49 INTEGER,
intent(in) :: lrgroups(n)
50 INTEGER(8) :: ptrast(keep(28))
51 INTEGER(8) :: ptrfac(keep(28))
52 INTEGER(8) :: pamaster(keep(28))
53 INTEGER ptrist(keep(28)), ptlust_s(keep(28))
54 INTEGER step(n), pimaster(keep(28))
56 INTEGER nstk_s( keep(28) ), procnode_steps( keep(28) )
58 INTEGER iflag, ierror, comm
60 INTEGER ipool( lpool )
62 INTEGER frtptr( n+1 ), frtelt( nelt )
63 INTEGER myid, slavef, nbfin
64 DOUBLE PRECISION opassw, opeliw
65 INTEGER itloc( n + keep(253) ), fils( n ), dad(keep(28))
66 COMPLEX :: rhs_mumps(keep(255))
67 INTEGER(8),
INTENT(IN) :: ptrarw( lptrar ), ptraiw( lptrar )
68 INTEGER nd( keep(28) ), frere( keep(28) )
69 INTEGER intarr(keep8(27))
70 COMPLEX dblarr(keep8(26))
71 INTEGER istep_to_iniv2(keep(71)),
72 & tab_pos_in_pere(slavef+2,
max(1,keep(56)))
73 include
'mumps_tags.h'
74 include
'mumps_headers.h'
75 INTEGER i, lcont, ncol_to_send, lda
76 INTEGER(8) :: shift_val_son, poselt
77 INTEGER fpere, ioldps, nfront, npiv, nass, nslaves,
78 & h_inode, nelim, nbcol, list_nelim_row,
79 & list_nelim_col, nelim_local, type_son,
80 & nrow, ncol, nbrow, shift_list_row_son,
81 & shift_list_col_son, ldafs, ierr,
82 & ison, pdest_master_ison
83 INTEGER :: status(mpi_status_size)
84 LOGICAL blocking, set_irecv, message_received
85 INTEGER msgsou, msgtag
92 & keep(199) ).EQ.myid)
THEN
93 ioldps = ptlust_s(step(inode))
94 nfront = iw(ioldps+keep(ixsz))
95 npiv = iw(ioldps+1+keep(ixsz))
96 nass = iabs(iw(ioldps + 2+keep(ixsz)))
97 nslaves = iw(ioldps+5+keep(ixsz))
98 h_inode = 6 + nslaves + keep(ixsz)
100 nbcol = nfront - npiv
101 list_nelim_row = ioldps + h_inode + npiv
102 list_nelim_col = list_nelim_row + nfront
104 write(6,*)
' ERROR 1 in CMUMPS_PROCESS_ROOT2SON ', nelim
105 write(6,*) myid,
':Process root2son: INODE=',inode,
106 &
'Header=',iw(ptlust_s(step(inode)):ptlust_s(step(inode))
110 nelim_local = nelim_root
112 root%RG2L_ROW(iw(list_nelim_row)) = nelim_local
113 root%RG2L_COL(iw(list_nelim_col)) = nelim_local
114 nelim_local = nelim_local + 1
115 list_nelim_row = list_nelim_row + 1
116 list_nelim_col = list_nelim_col + 1
118 nbrow = nfront - npiv
120 IF ( keep( 50 ) .eq. 0 )
THEN
125 shift_list_row_son = h_inode + npiv
126 shift_list_col_son = h_inode + nfront + npiv
127 IF ( keep(50).eq.0 .OR. type_son .eq. 1 )
THEN
132 shift_val_son = int(npiv,8) * int(ldafs,8) + int(npiv,8)
136 & ptlust_s(1), ptrast(1),
137 & root, nrow, ncol, shift_list_row_son,
138 & shift_list_col_son , shift_val_son, ldafs,
139 & root_non_elim_cb, myid, comm,
140 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
141 & iwpos, iwposcb, iptrlu, lrlu, lrlus, iw, liw, a, la,
142 & ptrist, ptlust_s(1), ptrfac(1), ptrast(1),
143 & step, pimaster, pamaster,
144 & nstk_s,
comp, iflag, ierror, perm,
145 & ipool, lpool, leaf, nbfin, slavef,
146 & opassw, opeliw, itloc, rhs_mumps,
147 & fils, dad, ptrarw, ptraiw,
148 & intarr,dblarr,icntl,keep,keep8,dkeep,.false.,nd,frere,
149 & lptrar, nelt, frtptr, frtelt,
150 & istep_to_iniv2, tab_pos_in_pere
153 IF (iflag.LT.0 )
RETURN
154 IF (type_son.EQ.1)
THEN
157 shift_list_row_son = h_inode + nass
158 shift_list_col_son = h_inode + nfront + npiv
159 shift_val_son = int(nass,8) * int(nfront,8) + int(npiv,8)
160 IF ( keep( 50 ) .eq. 0 )
THEN
161 transpose_asm = .false.
163 transpose_asm = .true.
168 & root, nrow, ncol, shift_list_row_son,
169 & shift_list_col_son , shift_val_son, nfront,
170 & root_non_elim_cb, myid, comm,
172 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
173 & iwpos, iwposcb, iptrlu, lrlu, lrlus, iw, liw, a, la,
174 & ptrist, ptlust_s, ptrfac,
175 & ptrast, step, pimaster, pamaster,
176 & nstk_s,
comp, iflag, ierror, perm,
177 & ipool, lpool, leaf, nbfin, slavef,
178 & opassw, opeliw, itloc, rhs_mumps,
179 & fils, dad, ptrarw, ptraiw,
180 & intarr,dblarr,icntl,keep,keep8,dkeep,
181 & transpose_asm,nd,frere,
182 & lptrar, nelt, frtptr, frtelt,
183 & istep_to_iniv2, tab_pos_in_pere, lrgroups )
184 IF (iflag.LT.0 )
RETURN
186 ioldps = ptlust_s(step(inode))
187 poselt = ptrast(step(inode))
188 iw(ioldps + 4+keep(ixsz)) = step(inode)
189 ptrfac(step(inode))=poselt
190 IF ( type_son .eq. 1 )
THEN
191 nbrow = nfront - npiv
195 IF ( type_son .eq. 1 .OR. keep(50).EQ.0)
THEN
202 & int(lda,8)*int(nbrow+npiv,8), iw(ioldps+h_inode+nfront))
203 iw(ioldps + keep(ixsz)) = nbcol
204 iw(ioldps + 1 +keep(ixsz)) = nass - npiv
205 IF (type_son.EQ.2)
THEN
206 iw(ioldps + 2 +keep(ixsz)) = nass
208 iw(ioldps + 2 +keep(ixsz)) = nfront
210 iw(ioldps + 3 +keep(ixsz)) = npiv
212 & a, la, posfac, lrlu, lrlus,
213 & iwpos, ptrast,ptrfac,step, keep,keep8, .false.,inode,ierr
225 IF ( ptrist(step(ison)) .EQ. 0)
THEN
228 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
229 & iwpos, iwposcb, iptrlu,
230 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
232 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
233 & iflag, ierror, comm,
234 & perm, ipool, lpool, leaf, nbfin, myid, slavef,
236 & root, opassw, opeliw, itloc, rhs_mumps,
237 & fils, dad, ptrarw, ptraiw,
238 & intarr, dblarr,icntl,keep,keep8,dkeep,nd,frere,lptrar,
239 & nelt, frtptr, frtelt,
240 & istep_to_iniv2, tab_pos_in_pere, .true.
243 IF ( iflag .LT. 0 )
RETURN
246 & ( iw( ptrist(step(ison)) + 1 +keep(ixsz)) .NE.
247 & iw( ptrist(step(ison)) + 3 +keep(ixsz)) ) .OR.
248 & ( keep(50) .NE. 0 .AND.
249 & iw( ptrist(step(ison)) + 6 +keep(ixsz)) .NE. 0 ) )
250 IF ( keep(50).eq.0)
THEN
251 msgsou = pdest_master_ison
255 & iw( ptrist(step(ison)) + 3 +keep(ixsz)) )
THEN
256 msgsou = pdest_master_ison
257 msgtag = bloc_facto_sym
259 msgsou = mpi_any_source
260 msgtag = bloc_facto_sym_slave
265 message_received = .false.
267 & blocking, set_irecv, message_received,
270 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
271 & iwpos, iwposcb, iptrlu,
272 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
274 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
275 & iflag, ierror, comm,
276 & perm, ipool, lpool, leaf, nbfin, myid, slavef,
278 & root, opassw, opeliw, itloc, rhs_mumps,
279 & fils, dad, ptrarw, ptraiw,
280 & intarr,dblarr,icntl,keep,keep8,dkeep,nd, frere, lptrar,
281 & nelt, frtptr, frtelt,
282 & istep_to_iniv2, tab_pos_in_pere, .true.
285 IF ( iflag .LT. 0 )
RETURN
287 ioldps = ptrist(step(inode))
288 lcont = iw(ioldps+keep(ixsz))
289 nrow = iw(ioldps+2+keep(ixsz))
290 npiv = iw(ioldps+3+keep(ixsz))
291 nass = iw(ioldps+4+keep(ixsz))
294 write(6,*) myid,': inode,lcont, nrow, npiv, nass, nelim=
',
295 & INODE,LCONT, NROW, NPIV, NASS, NELIM
296 write(6,*) MYID,': ioldps=
',IOLDPS
300 NSLAVES= IW(IOLDPS+5+KEEP(IXSZ))
301 H_INODE = 6 + NSLAVES + KEEP(IXSZ)
302 LIST_NELIM_COL = IOLDPS + H_INODE + NROW + NPIV
303 NELIM_LOCAL = NELIM_ROOT
305 root%RG2L_COL(IW(LIST_NELIM_COL)) = NELIM_LOCAL
306 root%RG2L_ROW(IW(LIST_NELIM_COL)) = NELIM_LOCAL
307 NELIM_LOCAL = NELIM_LOCAL + 1
308 LIST_NELIM_COL = LIST_NELIM_COL + 1
310 SHIFT_LIST_ROW_SON = 6 + IW(IOLDPS+5+KEEP(IXSZ)) + KEEP(IXSZ)
311 SHIFT_LIST_COL_SON = SHIFT_LIST_ROW_SON + NROW + NPIV
314 SHIFT_VAL_SON = -9999_8
315.eq.
IF ( KEEP( 50 ) 0 ) THEN
316 TRANSPOSE_ASM = .FALSE.
318 TRANSPOSE_ASM = .TRUE.
320 CALL CMUMPS_BUILD_AND_SEND_CB_ROOT( COMM_LOAD, ASS_IRECV,
323 & root, NROW, NCOL_TO_SEND, SHIFT_LIST_ROW_SON,
324 & SHIFT_LIST_COL_SON , SHIFT_VAL_SON, LDA,
325 & ROOT_NON_ELIM_CB, MYID, COMM,
327 & BUFR, LBUFR, LBUFR_BYTES, PROCNODE_STEPS, POSFAC,
328 & IWPOS, IWPOSCB, IPTRLU, LRLU, LRLUS, IW, LIW, A, LA,
329 & PTRIST, PTLUST_S, PTRFAC,
330 & PTRAST, STEP, PIMASTER, PAMASTER,
331 & NSTK_S, COMP, IFLAG, IERROR, PERM,
332 & IPOOL, LPOOL, LEAF, NBFIN, SLAVEF,
333 & OPASSW, OPELIW, ITLOC, RHS_MUMPS,
334 & FILS, DAD, PTRARW, PTRAIW,
335 & INTARR,DBLARR,ICNTL,KEEP,KEEP8,DKEEP,TRANSPOSE_ASM,
336 & ND, FRERE, LPTRAR, NELT, FRTPTR, FRTELT,
337 & ISTEP_TO_INIV2, TAB_POS_IN_PERE, LRGROUPS)
338.LT.
IF (IFLAG0 ) RETURN
339.EQ.
IF (KEEP(214)2) THEN
340 CALL CMUMPS_STACK_BAND( N, INODE,
341 & PTRIST, PTRAST, PTLUST_S, PTRFAC, IW, LIW, A, LA,
342 & LRLU, LRLUS, IWPOS, IWPOSCB, POSFAC, COMP,
343 & IPTRLU, OPELIW, STEP, PIMASTER, PAMASTER,
344 & IFLAG, IERROR, SLAVEF, PROCNODE_STEPS, DAD, MYID, COMM,
345 & KEEP, KEEP8, DKEEP,TYPE_SON
349 CALL CMUMPS_BDC_ERROR( MYID, SLAVEF, COMM, KEEP )
recursive subroutine cmumps_try_recvtreat(comm_load, ass_irecv, blocking, set_irecv, message_received, msgsou, msgtag, status, bufr, lbufr, lbufr_bytes, procnode_steps, posfac, iwpos, iwposcb, iptrlu, lrlu, lrlus, n, iw, liw, a, la, ptrist, ptlust, ptrfac, ptrast, step, pimaster, pamaster, nstk_s, comp, iflag, ierror, comm, perm, ipool, lpool, leaf, nbfin, myid, slavef 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, stack_right_authorized, lrgroups)
recursive subroutine cmumps_build_and_send_cb_root(comm_load, ass_irecv, n, ison, iroot, ptri, ptrr, root, nbrow, nbcol, shift_list_row_son, shift_list_col_son, shift_val_son_arg, lda_arg, tag, myid, comm, bufr, lbufr, lbufr_bytes, procnode_steps, posfac, iwpos, iwposcb, iptrlu, lrlu, lrlus, iw, liw, a, la, ptrist, ptlust_s, ptrfac, ptrast, step, pimaster, pamaster, nstk, comp, iflag, ierror, perm, ipool, lpool, leaf, nbfin, slavef, opassw, opeliw, itloc, rhs_mumps, fils, dad, ptrarw, ptraiw, intarr, dblarr, icntl, keep, keep8, dkeep, transpose_asm, nd, frere, lptrar, nelt, frtptr, frtelt, istep_to_iniv2, tab_pos_in_pere, lrgroups)