36 IMPLICIT NONE
37 TYPE (SMUMPS_ROOT_STRUC) :: root
38 INTEGER ICNTL( 60 ), KEEP( 500 )
39 INTEGER(8) KEEP8(150)
40 REAL DKEEP(230)
41 INTEGER LBUFR, LBUFR_BYTES
42 INTEGER COMM_LOAD, ASS_IRECV, MSGLEN
43 INTEGER BUFR( LBUFR )
44 INTEGER(8) :: LRLU, IPTRLU, LRLUS, LA, POSFAC
45 INTEGER N, SLAVEF, IWPOS, IWPOSCB, LIW
46 INTEGER NBFIN
47 INTEGER COMP
48 INTEGER NELT, LPTRAR
49 INTEGER PROCNODE_STEPS( (28) ), PTRIST(KEEP(28))
50 INTEGER(8) :: PTRAST(KEEP(28)), PAMASTER(KEEP(28))
51 INTEGER(8) :: PTRFAC(KEEP(28))
52 INTEGER STEP(N), PIMASTER(KEEP(28))
53 INTEGER PTLUST( KEEP(28) )
54 INTEGER PERM(N)
55 INTEGER IW( LIW )
56 REAL A( LA )
57 INTEGER, intent(in) :: LRGROUPS(N)
58 INTEGER ITLOC( N + KEEP(253)), NSTK_S( KEEP(28) )
59 INTEGER :: FILS( N ), DAD(KEEP(28))
60 REAL :: RHS_MUMPS(KEEP(255))
61 INTEGER ND(KEEP(28)), FRERE_STEPS( KEEP(28) )
62 INTEGER(8), INTENT(IN) :: PTRARW( LPTRAR ), PTRAIW( LPTRAR )
63 INTEGER INTARR( KEEP8(27) )
64 REAL DBLARR( KEEP8(26) )
65 DOUBLE PRECISION OPASSW, OPELIW
66 INTEGER COMM, MYID, IFLAG, IERROR
67 INTEGER LEAF, LPOOL
68 INTEGER IPOOL( LPOOL )
69 INTEGER FRTPTR(N+1), FRTELT( NELT )
70 INTEGER ISTEP_TO_INIV2(KEEP(71)),
71 & TAB_POS_IN_PERE(SLAVEF+2,max(1,KEEP(56)))
72 INTEGER NFS4FATHER
73 include 'mpif.h'
74 include 'mumps_tags.h'
75 INTEGER MUMPS_PROCNODE, MUMPS_TYPESPLIT
77 INTEGER IERR
78 INTEGER NBROWS_ALREADY_SENT, NBROWS_PACKET
79 INTEGER I, INODE, ISON, POSITION, NBROW, LROW, , INDCOL
80 INTEGER LREQI
81 INTEGER(8) :: LREQA, POSCONTRIB
82 INTEGER ROW_LENGTH
83 INTEGER MASTER
84 INTEGER ISTCHK
85 LOGICAL SAME_PROC
86 LOGICAL SLAVE_NODE
87 LOGICAL IS_ofType5or6
88 INTEGER ISHIFT_BUFR, LBUFR_LOC, LBUFR_BYTES_LOC
89 INTEGER TYPESPLIT
90 INTEGER DECR
91 INTEGER :: INBPROCFILS_SON
92 LOGICAL :: CB_IS_LR
93 INTEGER :: CB_IS_LR_INT, NB_BLR_COLS, allocok,
94 & NBROWS_PACKET_2PACK, PANEL_BEG_OFFSET
95 INTEGER(8) :: LA_TEMP
96 REAL, ALLOCATABLE :: A_TEMP(:)
97 TYPE (LRB_TYPE), POINTER :: LRB
98 TYPE (LRB_TYPE), ALLOCATABLE, TARGET :: BLR_CB(:)
99 INTEGER(8) :: IACHK, SIZFR8, DYN_SIZE
100 REAL, DIMENSION(:), POINTER :: DYNPTR
101 INTEGER :: NSLAVES, NFRONT, NASS1, IOLDPS, PARPIV_T1
102 INTEGER :: NB_POSTPONED
103 LOGICAL :: LR_ACTIVATED
104 INTEGER(8) :: POSELT
105 INTEGER :: XXG_STATUS
106 include 'mumps_headers.h'
107 position = 0
108 CALL mpi_unpack( bufr, lbufr_bytes, position, inode, 1,
109 & mpi_integer, comm, ierr )
110 CALL mpi_unpack( bufr, lbufr_bytes, position, ison, 1,
111 & mpi_integer, comm, ierr )
112 CALL mpi_unpack( bufr, lbufr_bytes, position, nbrow, 1,
113 & mpi_integer, comm, ierr )
114 CALL mpi_unpack( bufr, lbufr_bytes, position, lrow, 1,
115 & mpi_integer, comm, ierr )
117 & nbrows_already_sent, 1,
118 & mpi_integer, comm, ierr )
120 & nbrows_packet, 1,
121 & mpi_integer, comm, ierr )
123 & cb_is_lr_int, 1,
124 & mpi_integer, comm, ierr )
125 cb_is_lr = (cb_is_lr_int.EQ.1)
127 & keep(199) )
128 slave_node = master .NE.
myid
130 & keep(199) )
131 is_oftype5or6 = ((typesplit.EQ.5).OR.(typesplit.EQ.6))
132 IF (slave_node .AND. ptrist(step(inode)) ==0) THEN
133 ishift_bufr = ( msglen + keep(34) ) / keep(34)
134 lbufr_loc = lbufr - ishift_bufr + 1
135 lbufr_bytes_loc = lbufr_loc * keep(34)
137 & bufr(ishift_bufr), lbufr_loc, lbufr_bytes_loc,
138 & procnode_steps, posfac,
139 & iwpos, iwposcb, iptrlu,
140 & lrlu, lrlus, n, iw, liw, a, la,
141 & ptrist, ptlust, ptrfac,
142 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
143 & iflag, ierror, comm,
144 & perm, ipool, lpool, leaf,
145 & nbfin,
myid, slavef,
146 &
147 & root, opassw, opeliw, itloc, rhs_mumps, fils, dad,
148 & ptrarw, ptraiw,
149 & intarr, dblarr, icntl,keep,keep8,dkeep,nd, frere_steps,
150 & lptrar, nelt, frtptr, frtelt,
151 & istep_to_iniv2, tab_pos_in_pere, .true.
152 & , lrgroups
153 & )
154 IF (iflag.LT.0) RETURN
155 ENDIF
156 IF ( slave_node ) THEN
157 lreqi = lrow + nbrows_packet
158 ELSE
159 lreqi = nbrows_packet
160 END IF
161 lreqa = int(lrow,8)
163 & lreqi, lreqa, .false.,
164 & keep(1), keep8(1),
165 & n, iw, liw, a, la,
166 & lrlu, iptrlu,
167 & iwpos, iwposcb, ptrist, ptrast,
168 & step, pimaster, pamaster, lrlus,
169 & keep(ixsz),
comp, dkeep(97),
170 &
myid, slavef, procnode_steps, dad,
171 & iflag, ierror )
172 IF (iflag.LT.0) THEN
174 RETURN
175 ENDIF
176 lrlu = lrlu - lreqa
177 lrlus = lrlus - lreqa
178 poscontrib = posfac
179 posfac = posfac + lreqa
180 keep8(67) =
min(lrlus, keep8(67))
181 keep8(69) = keep8(69) + lreqa
182 keep8(68) =
max(keep8(69), keep8(68))
184 & la-lrlus,0_8,lreqa,keep,keep8,lrlus)
185 IF ( slave_node ) THEN
186 irow = iwpos
187 indcol = iwpos + nbrows_packet
188 ELSE
189 irow = iwpos
190 indcol = -1
191 END IF
192 iwpos = iwpos + lreqi
193 IF ( slave_node ) THEN
195 & iw( indcol ), lrow, mpi_integer,
196 & comm, ierr )
197 END IF
198 DO i = 1, nbrows_packet
200 & iw( irow + i - 1 ), 1, mpi_integer,
201 & comm, ierr )
202 END DO
203 IF ( slave_node ) THEN
204 IF ( nbrows_already_sent + nbrows_packet == nbrow ) THEN
205 iw(ptrist(step(inode))+xxnbpr) =
206 & iw(ptrist(step(inode))+xxnbpr) - nbrow
207 ENDIF
208 IF ( keep(55) .eq. 0 ) THEN
210 & (n, inode, iw, liw, a, la,
211 & nbrow, lrow,
212 & opassw, opeliw, step, ptrist, ptrast,
213 & itloc, rhs_mumps,
214 & fils, ptrarw, ptraiw, intarr, dblarr, icntl,
215 & keep,keep8,
myid, lrgroups )
216 ELSE
218 & nelt, frtptr, frtelt,
219 & n, inode, iw, liw, a, la,
220 & nbrow, lrow,
221 & opassw, opeliw, step, ptrist, ptrast,
222 & itloc, rhs_mumps,
223 & fils, ptrarw, ptraiw, intarr, dblarr, icntl,
224 & keep,keep8,
myid, lrgroups )
225 ENDIF
226 IF (cb_is_lr) THEN
228 & nb_blr_cols, 1,
229 & mpi_integer, comm, ierr )
231 & panel_beg_offset, 1,
232 & mpi_integer, comm, ierr )
233 allocate(blr_cb(nb_blr_cols),stat=allocok)
234 IF (allocok.GT.0) THEN
235 ierror = nb_blr_cols
236 iflag = -13
238 RETURN
239 ENDIF
240 DO i=1,nb_blr_cols
241 lrb => blr_cb(i)
243 & lbufr_bytes, position, lrb, keep8,
244 & comm, iflag, ierror
245 & )
246 ENDDO
247 nbrows_packet_2pack =
max(nbrows_packet,blr_cb(1)%M)
248 la_temp = nbrows_packet_2pack*lrow
250 & .false., keep8, iflag, ierror, .true., .true.)
251 allocate(a_temp(la_temp),stat=allocok)
252 IF (allocok.GT.0) THEN
254 iflag = -13
256 RETURN
257 ENDIF
258#if defined(BLR_MT)
259
260#endif
262 & lrow, lrow, .true., 1, 1,
263 & nb_blr_cols, blr_cb, 0, 'V', 3,
264 & cbasm_tofix_in=.true.,
265 & only_nelim_in=nbrows_packet_2pack-panel_beg_offset)
266#if defined(BLR_MT)
267
268#endif
269 DO i=1,nbrows_packet
270 IF (keep(50).EQ.0) THEN
271 row_length = lrow
272 ELSE
274 & row_length,
275 & 1,
276 & mpi_integer,
277 & comm, ierr )
278 ENDIF
280 & 1, row_length, iw( irow+i-1 ),iw(indcol),
281 & a_temp(1+(i-1+panel_beg_offset)*lrow),
282 & opassw, opeliw, step, ptrist, ptrast,
283 & itloc, rhs_mumps,
284 & fils, icntl, keep,keep8,
myid, is_oftype5or6,
285 & lrow)
286 ENDDO
288 & keep(34))
289 deallocate(a_temp, blr_cb)
291 & .false., keep8, iflag, ierror, .true., .true.)
292 GOTO 200
293 ENDIF
294 DO i=1,nbrows_packet
295 IF(keep(50).NE.0)THEN
297 & row_length,
298 & 1,
299 & mpi_integer,
300 & comm, ierr )
301 ELSE
302 row_length=lrow
303 ENDIF
305 & a(poscontrib),
306 & row_length,
307 & mpi_real,
308 & comm, ierr )
310 & 1, row_length, iw( irow+i-1 ),iw(indcol),
311 & a(poscontrib),
312 & opassw, opeliw, step, ptrist, ptrast,
313 & itloc, rhs_mumps,
314 & fils, icntl, keep,keep8,
myid, is_oftype5or6,
315 & row_length )
316 ENDDO
317 200 CONTINUE
319 & (n, inode, iw, liw,
320 & nbrows_packet, step, ptrist,
321 & itloc, rhs_mumps,keep,keep8)
322 ELSE
323 IF (cb_is_lr) THEN
325 & nb_blr_cols, 1,
326 & mpi_integer, comm, ierr )
328 & panel_beg_offset, 1,
329 & mpi_integer, comm, ierr )
330 allocate(blr_cb(nb_blr_cols),stat=allocok)
331 IF (allocok.GT.0) THEN
332 ierror = nb_blr_cols
333 iflag = -13
335 RETURN
336 ENDIF
337 DO i=1,nb_blr_cols
338 lrb => blr_cb(i)
340 & lbufr_bytes, position, lrb, keep8,
341 & comm, iflag, ierror
342 & )
343 ENDDO
344 nbrows_packet_2pack =
max(nbrows_packet,blr_cb(1)%M)
345 la_temp = nbrows_packet_2pack*lrow
347 & .false., keep8, iflag, ierror, .true., .true.)
348 allocate(a_temp(la_temp),stat=allocok)
349 IF (allocok.GT.0) THEN
351 iflag = -13
353 RETURN
354 ENDIF
355#if defined(BLR_MT)
356
357#endif
359 & lrow, lrow, .true., 1, 1,
360 & nb_blr_cols, blr_cb, 0, 'V', 4,
361 & cbasm_tofix_in=.true.,
362 & only_nelim_in=nbrows_packet_2pack-panel_beg_offset)
363#if defined(BLR_MT)
364
365#endif
366 DO i=1,nbrows_packet
367 IF(keep(50).NE.0)THEN
369 & row_length,
370 & 1,
371 & mpi_integer,
372 & comm, ierr )
373 ELSE
374 row_length=lrow
375 ENDIF
377 & ison, 1, row_length, iw( irow+i-1 ),
378 & a_temp(1+(i-1+panel_beg_offset)*lrow),
379 & ptlust, ptrast,
380 & step, pimaster, opassw,
381 & iwposcb,
myid, keep,keep8,
382 & is_oftype5or6, lrow
383 & )
384 ENDDO
386 & keep(34))
387 deallocate(a_temp, blr_cb)
389 & .false., keep8, iflag, ierror, .true., .true.)
390 GOTO 300
391 ENDIF
392 DO i=1,nbrows_packet
393 IF(keep(50).NE.0)THEN
395 & row_length,
396 & 1,
397 & mpi_integer,
398 & comm, ierr )
399 ELSE
400 row_length=lrow
401 ENDIF
403 & a(poscontrib),
404 & row_length,
405 & mpi_real,
406 & comm, ierr )
408 & ison, 1, row_length, iw( irow +i-1 ),
409 & a(poscontrib), ptlust, ptrast,
410 & step, pimaster, opassw,
411 & iwposcb,
myid, keep,keep8,
412 & is_oftype5or6, row_length
413 &)
414 ENDDO
415 300 CONTINUE
416 IF (nbrows_already_sent .EQ. 0) THEN
417 IF (keep(219).NE.0) THEN
418 IF(keep(50) .EQ. 2) THEN
420 & nfs4father,
421 & 1,
422 & mpi_integer,
423 & comm, ierr )
424 IF(nfs4father .GT. 0) THEN
426 IF (ierr .NE. 0) THEN
428 iflag = -13
430 RETURN
431 ENDIF
434 & nfs4father,
435 & mpi_real,
436 & comm, ierr )
438 & ison, nfs4father,
440 & step, pimaster, opassw,
441 & iwposcb,
myid, keep,keep8)
442 ENDIF
443 ENDIF
444 ENDIF
445 ENDIF
446 IF (nbrows_already_sent + nbrows_packet == nbrow ) THEN
447 decr = 1
448 istchk = pimaster(step(ison))
449 same_proc = istchk .LT. iwposcb
450 iw(ptlust(step(inode))+xxnbpr) =
451 & iw(ptlust(step(inode))+xxnbpr) - decr
452 IF (same_proc) THEN
453 inbprocfils_son = ptrist(step(ison))+xxnbpr
454 ELSE
455 inbprocfils_son = pimaster(step(ison))+xxnbpr
456 ENDIF
457 iw(inbprocfils_son) = iw(inbprocfils_son) - decr
458 IF ( iw(inbprocfils_son) .EQ. 0 ) THEN
459 IF (same_proc) THEN
461 & pimaster, ptlust, iw, liw, step, keep,keep8)
462 ENDIF
463 IF (same_proc) THEN
464 istchk = ptrist(step(ison))
465 ptrist(step( ison) ) = -99999999
466 ELSE
467 pimaster(step( ison )) = -99999999
468 ENDIF
470 & pamaster(step(ison)), iw(istchk+xxd),
471 & iw(istchk+xxr), dynptr, iachk, sizfr8)
473 xxg_status = iw(istchk+xxg)
475 & .false.,
myid, n, istchk,
476 & iw, liw, lrlu, lrlus, iptrlu
477 & la, keep,keep8, .false.
478 & )
479 IF ( dyn_size .GT. 0_8 ) THEN
481 & dynptr, dyn_size,
482 & keep(405).EQ.1, keep8 )
483 ENDIF
484 ENDIF
485 IF (iw(ptlust(step(inode))+xxnbpr) .EQ. 0) THEN
486 ioldps = ptlust(step(inode))
487 nslaves= iw(ioldps+5+keep(ixsz))
488 IF (nslaves.EQ.0) THEN
489 nfront = iw(ioldps+keep(ixsz))
490 nass1 = iabs(iw(ioldps + 2+keep(ixsz)))
491 poselt = ptrast(step(inode))
492 parpiv_t1 = -999
493 lr_activated = (iw(ioldps+xxlr).GT.0)
494 nb_postponed =
max(nfront - nd(step(inode)),0)
496 & n, inode, iw, liw, a, la, keep, perm,
497 & ioldps, poselt,
498 & nfront, nass1, lr_activated, parpiv_t1,
499 & nb_postponed)
500 ENDIF
502 & procnode_steps,
503 & slavef, keep(199), keep(28), keep(76), keep(80),
504 & keep(47), step, inode+n )
505 IF (keep(47) .GE. 3) THEN
507 & ipool, lpool,
508 & procnode_steps, keep,keep8, slavef, comm_load,
509 &
myid, step, n, nd, fils )
510 ENDIF
511 ENDIF
512 ENDIF
513 END IF
514 iwpos = iwpos - lreqi
515 lrlu = lrlu + lreqa
516 lrlus = lrlus + lreqa
517 keep8(69) = keep8(69) - lreqa
518 posfac = posfac - lreqa
520 & la-lrlus,0_8,-lreqa,keep,keep8,lrlus)
521 RETURN
subroutine mpi_unpack(inbuf, insize, position, outbuf, outcnt, datatype, comm, ierr)
subroutine, public smumps_mpi_unpack_lrb(bufr, lbufr, lbufr_bytes, position, lrb, keep8, comm, iflag, ierror)
real, dimension(:), allocatable, target, save, public buf_max_array
integer, save, public buf_lmax_array
subroutine, public smumps_buf_max_array_minsize(nfs4father, ierr)
subroutine smumps_dm_set_dynptr(cb_state, a, la, pamaster_or_ptrast, ixxd, ixxr, son_a, iachk, recsize)
subroutine smumps_dm_free_block(xxg_status, dynptr, sizfr8, atomic_updates, keep8)
subroutine smumps_decompress_panel(a, la, poselt, lda11, lda21, copy_dense_blocks, begs_blr_diag, begs_blr_first_offdiag, nb_blr, blr_panel, current_blr, dir, decomp_timer, beg_i_in, end_i_in, only_nelim_in, cbasm_tofix_in)
subroutine, public smumps_load_mem_update(ssarbr, process_bande_arg, mem_value, new_lu, inc_mem_arg, keep, keep8, lrlus)
subroutine, public smumps_load_pool_upd_new_pool(pool, lpool, procnode, keep, keep8, slavef, comm, myid, step, n, nd, fils)
integer, save, private myid
subroutine dealloc_blr_panel(blr_panel, iend, keep8, k34, ibeg_in)
subroutine smumps_bdc_error(myid, slavef, comm, keep)
subroutine smumps_asm_slave_to_slave_init(n, inode, iw, liw, a, la, nbrows, nbcols, opassw, opeliw, step, ptrist, ptrast, itloc, rhs_mumps, fils, ptrarw, ptraiw, intarr, dblarr, icntl, keep, keep8, myid, lrgroups)
subroutine smumps_asm_slave_to_slave(n, inode, iw, liw, a, la, nbrows, nbcols, rowlist, collist, valson, opassw, opeliw, step, ptrist, ptrast, itloc, rhs_mumps, fils, icntl, keep, keep8, myid, is_oftype5or6, lda_valson)
subroutine smumps_parpivt1_set_nvschur_max(n, inode, iw, liw, a, la, keep, perm, ioldps, poselt, nfront, nass1, lr_activated, parpiv_t1, nb_postponed)
subroutine smumps_asm_max(n, inode, iw, liw, a, la, ison, nbcols, valson, ptlust_s, ptrast, step, pimaster, opassw, iwposcb, myid, keep, keep8)
subroutine smumps_restore_indices(n, ison, inode, iwposcb, pimaster, ptlust_s, iw, liw, step, keep, keep8)
subroutine smumps_asm_slave_master(n, inode, iw, liw, a, la, ison, nbrows, nbcols, rowlist, valson, ptlust_s, ptrast, step, pimaster, opassw, iwposcb, myid, keep, keep8, is_oftype5or6, lda_valson)
subroutine smumps_asm_slave_to_slave_end(n, inode, iw, liw, nbrows, step, ptrist, itloc, rhs_mumps, keep, keep8)
subroutine smumps_elt_asm_s_2_s_init(nelt, frt_ptr, frt_elt, n, inode, iw, liw, a, la, nbrows, nbcols, opassw, opeliw, step, ptrist, ptrast, itloc, rhs_mumps, fils, ptrarw, ptraiw, intarr, dblarr, icntl, keep, keep8, myid, lrgroups)
subroutine smumps_get_size_needed(sizei_needed, sizer_needed, skip_top_stack, keep, keep8, n, iw, liw, a, la, lrlu, iptrlu, iwpos, iwposcb, ptrist, ptrast, step, pimaster, pamaster, lrlus, xsize, comp, acc_time, myid, slavef, procnode_steps, dad, iflag, ierror)
subroutine smumps_free_block_cb_static(ssarbr, myid, n, iposblock, iw, liw, lrlu, lrlus, iptrlu, iwposcb, la, keep, keep8, in_place_stats)
recursive subroutine smumps_treat_descband(inode, comm_load, ass_irecv, 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)
subroutine smumps_insert_pool_n(n, pool, lpool, procnode, slavef, keep199, k28, k76, k80, k47, step, inode)