43
44 IMPLICIT NONE
45 include 'mumps_headers.h'
46 TYPE (SMUMPS_ROOT_STRUC) :: root
47 INTEGER ICNTL( 60 ), KEEP( 500 )
48 INTEGER(8) KEEP8(150)
49 REAL DKEEP(230)
50 INTEGER LBUFR, LBUFR_BYTES
51 INTEGER COMM_LOAD, ASS_IRECV
52 INTEGER BUFR( LBUFR )
53 INTEGER N, SLAVEF, IWPOS, IWPOSCB, LIW
54 INTEGER(8) :: IPTRLU, LRLU, LRLUS, LA
55 INTEGER(8) :: POSFAC
56 INTEGER COMP
57 INTEGER IFLAG, IERROR, NBFIN, MSGSOU
58 INTEGER PROCNODE_STEPS(KEEP(28)), PTRIST(KEEP(28)),
59 & (KEEP(28))
60 INTEGER(8) :: PAMASTER(KEEP(28))
61 INTEGER(8) :: PTRAST(KEEP(28))
62 INTEGER(8) :: PTRFAC(KEEP(28))
63 INTEGER PERM(N), STEP(N),
64 & PIMASTER(KEEP(28))
65 INTEGER IW( LIW )
66 REAL A( LA )
67 INTEGER, intent(in) :: LRGROUPS(N)
68 INTEGER COMM, MYID
69 INTEGER NELT, LPTRAR
70 INTEGER FRTPTR( N+1 ), FRTELT( NELT )
71 INTEGER PTLUST_S(KEEP(28)),
72 & ITLOC(N+KEEP(253)), FILS(N), DAD(KEEP(28)), ND(KEEP(28))
73 REAL :
74INTEGER(8), INTENT(IN) :: PTRAIW( LPTRAR ), PTRARW( LPTRAR )
75 INTEGER FRERE_STEPS(KEEP(28))
76 DOUBLE PRECISION OPASSW, OPELIW
77 DOUBLE PRECISION FLOP1
78 INTEGER INTARR( KEEP8(27) )
79 REAL DBLARR( KEEP8(26) )
80 INTEGER LEAF, LPOOL
81 INTEGER IPOOL( LPOOL )
82 INTEGER ISTEP_TO_INIV2(KEEP(71)),
83 & TAB_POS_IN_PERE(SLAVEF+2,max(1,KEEP(56)))
84 include 'mpif.h'
85 include 'mumps_tags.h'
86 INTEGER :: STATUS(MPI_STATUS_SIZE)
87 LOGICAL :: I_HAVE_SET_K117
88 INTEGER INODE, POSITION, NPIV, IERR, LP
89 INTEGER NCOL
90 INTEGER(8) :: POSBLOCFACTO
91 INTEGER :: LD_BLOCFACTO
92 INTEGER(8) :: LA_BLOCFACTO
93 INTEGER(8) :: LA_PTR
94 INTEGER(8) :: POSELT
95 REAL, DIMENSION(:), POINTER :: A_PTR
96 INTEGER IOLDPS, LCONT1, NASS1, NROW1, NCOL1, NPIV1
97 INTEGER NSLAV1, HS, ISW
98 INTEGER (8) :: LPOS, UPOS, LPOS2, , KPOS
99 INTEGER ICT11
100 INTEGER I, , FPERE
101 LOGICAL LASTBL,
102 LOGICAL BLOCKING, SET_IRECV, MESSAGE_RECEIVED
103 REAL ONE,ALPHA
104 parameter(one = 1.0e0,
alpha=-1.0e0)
105 INTEGER LIWFAC, STRAT, NextPivDummy
106 TYPE(IO_BLOCK) :: MonBloc
107 LOGICAL LAST_CALL
108 INTEGER LRELAY_INFO
109 INTEGER :: INFO_TMP(2)
110 INTEGER :: IDUMMY(1)
111 INTEGER :: NELIM, NPARTSASS_MASTER, NPARTSASS_MASTER_AUX,
112 & IPANEL,
113 & CURRENT_BLR,
114 & NB_BLR_L, NB_BLR_U, NB_BLR_COL
115 TYPE (LRB_TYPE), POINTER, DIMENSION(:,:) :: CB_LRB
116 TYPE (LRB_TYPE), DIMENSION(:), POINTER :: BLR_U, BLR_L
117 LOGICAL :: LR_ACTIVATED, COMPRESS_CB, COMPRESS_PANEL
118 LOGICAL OOCWRITE_COMPATIBLE_WITH_BLR
119 INTEGER :: LR_ACTIVATED_INT
120 INTEGER, POINTER, DIMENSION(:) :: BEGS_BLR_L, BEGS_BLR_U,
121 & BEGS_BLR_COL
122 REAL, ALLOCATABLE, DIMENSION(:) :: WORK, TAU
123 INTEGER, ALLOCATABLE, DIMENSION(:) :: JPVT
124 REAL,ALLOCATABLE,DIMENSION(:) :: RWORK
125 REAL, ALLOCATABLE, DIMENSION(:,:) :: BLOCK
126 INTEGER :: OMP_NUM
127 INTEGER NPARTSASS, NPARTSCB, MAXI_CLUSTER, LWORK,
128 & MAXI_CLUSTER_L, MAXI_CLUSTER_U, MAXI_CLUSTER_COL
129 INTEGER :: allocok
130 INTEGER MUMPS_PROCNODE
132 keep_begs_blr_l = .false.
133 nullify(begs_blr_l)
134 nb_blr_u = -7654321
135 NULLIFY(begs_blr_u)
136 i_have_set_k117 = .false.
137 fpere = -1
138 position = 0
139 CALL mpi_unpack( bufr, lbufr_bytes, position, inode, 1,
140 & mpi_integer, comm, ierr )
141 CALL mpi_unpack( bufr, lbufr_bytes, position, npiv, 1,
142 & mpi_integer, comm, ierr )
143 lastbl = (npiv.LE.0)
144 IF (lastbl) THEN
145 npiv = -npiv
146 CALL mpi_unpack( bufr, lbufr_bytes, position, fpere, 1,
147 & mpi_integer, comm, ierr )
148 ENDIF
149 CALL mpi_unpack( bufr, lbufr_bytes, position, ncol, 1,
150 & mpi_integer, comm, ierr )
151 CALL mpi_unpack( bufr, lbufr_bytes, position, nelim, 1,
152 & mpi_integer, comm, ierr )
154 & npartsass_master , 1,
155 & mpi_integer, comm, ierr )
156 CALL mpi_unpack( bufr, lbufr_bytes, position, ipanel,
157 & 1, mpi_integer, comm, ierr )
158 CALL mpi_unpack( bufr, lbufr_bytes, position, lr_activated_int,
159 & 1, mpi_integer, comm, ierr )
160 lr_activated = (lr_activated_int.EQ.1)
161 IF ( lr_activated ) THEN
162 la_blocfacto = int(npiv,8) * int(npiv+nelim,8)
163 ELSE
164 la_blocfacto = int(npiv,8) * int(ncol,8)
165 ENDIF
167 & npiv, la_blocfacto, .false.,
168 & keep(1), keep8(1),
169 & n, iw, liw, a, la,
170 & lrlu, iptrlu,
171 & iwpos, iwposcb, ptrist, ptrast,
172 & step, pimaster, pamaster, lrlus,
173 & keep(ixsz),
comp,dkeep(97),
myid,slavef, procnode_steps,
174 & dad, iflag, ierror)
175 IF (iflag.LT.0) GOTO 700
176 lrlu = lrlu - la_blocfacto
177 lrlus = lrlus - la_blocfacto
178 keep8(67) =
min(lrlus, keep8(67))
179 keep8(69) = keep8(69) + la_blocfacto
180 keep8(68) =
max(keep8(69), keep8(68))
181 posblocfacto = posfac
182 posfac = posfac + la_blocfacto
184 & la-lrlus,0_8,la_blocfacto,keep,keep8
185 IF ((npiv .EQ. 0)
186 & ) THEN
187 ipiv=1
188 ELSE
189 ipiv = iwpos
190 iwpos = iwpos + npiv
191 IF (npiv .GT. 0) THEN
193 & iw( ipiv ), npiv,
194 & mpi_integer, comm, ierr )
195 ENDIF
196 IF ( lr_activated ) THEN
198 & a(posblocfacto), npiv*(npiv+nelim),
199 & mpi_real,
200 & comm, ierr )
201 ld_blocfacto = npiv+nelim
203 & nb_blr_u, 1, mpi_integer,
204 & comm, ierr )
205 ALLOCATE(blr_u(
max(nb_blr_u,1)), stat=allocok)
206 IF (allocok > 0 ) THEN
207 iflag = -13
208 ierror =
max(nb_blr_u,1)
209 lp = icntl(1)
210 IF (icntl(4) .LE. 0) lp=-1
211 IF (lp > 0)
WRITE(lp,*)
myid,
212 & ': ERROR allocation during SMUMPS_PROCESS_BLOCFACTO'
213 GOTO 700
214 ENDIF
215 ALLOCATE(begs_blr_u(nb_blr_u+2), stat=allocok)
216 IF (allocok > 0 ) THEN
217 iflag = -13
218 ierror = nb_blr_u+2
219 lp = icntl(1)
220 IF (icntl(4) .LE. 0) lp=-1
221 IF (lp > 0)
WRITE(lp,*)
myid,
222 & ': ERROR allocation during SMUMPS_PROCESS_BLOCFACTO'
223 GOTO 700
224 ENDIF
226 & position, npiv, nelim, 'H',
227 & blr_u
228 & begs_blr_u(1),
229 & keep8, comm, ierr, iflag, ierror)
230 IF (iflag.LT.0) GOTO 700
231 ELSE
233 & a(posblocfacto), npiv*ncol,
234 & mpi_real,
235 & comm, ierr )
236 ld_blocfacto = ncol
237 ENDIF
238 ENDIF
240 & lrelay_info, 1,
241 & mpi_integer, comm, ierr
242 IF (ptrist(step( inode )) .EQ. 0) THEN
244 & ass_irecv,
245 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
246 & iwpos, iwposcb, iptrlu,
247 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
248 & ptlust_s, ptrfac,
249 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
250 & iflag, ierror, comm,
251 & perm, ipool, lpool, leaf, nbfin,
myid, slavef,
252 &
253 & root, opassw, opeliw, itloc, rhs_mumps,
254 & fils, dad, ptrarw, ptraiw,
255 & intarr, dblarr, icntl,keep,keep8,dkeep,nd, frere_steps,
256 & lptrar, nelt, frtptr, frtelt,
257 & istep_to_iniv2, tab_pos_in_pere, .true.
258 & , lrgroups
259 & )
260 IF ( iflag .LT. 0 ) GOTO 600
261 ENDIF
262 IF ( iw( ptrist(step(inode)) + 3 +keep(ixsz)) .EQ. 0 ) THEN
263 DO WHILE ( iw(ptrist(step(inode)) + xxnbpr) .NE. 0)
264 blocking = .true.
265 set_irecv = .false.
266 message_received = .false.
268 & ass_irecv, blocking, set_irecv, message_received,
269 & mpi_any_source, contrib_type2,
270 & status,
271 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
272 & iwpos, iwposcb, iptrlu,
273 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
274 & ptlust_s, ptrfac,
275 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
276 & iflag, ierror, comm,
277 & perm, ipool, lpool, leaf, nbfin,
myid, slavef,
278 &
279 & root, opassw, opeliw, itloc, rhs_mumps,
280 & fils, dad, ptrarw, ptraiw,
281 & intarr, dblarr, icntl,keep,keep8,dkeep,nd, frere_steps,
282 & lptrar, nelt, frtptr, frtelt,
283 & istep_to_iniv2, tab_pos_in_pere, .true.
284 & , lrgroups
285 & )
286 IF ( iflag .LT. 0 ) GOTO 600
287 END DO
288 ENDIF
289 set_irecv = .true.
290 blocking = .false.
291 message_received = .true.
293 & blocking, set_irecv, message_received,
294 & mpi_any_source, mpi_any_tag,
295 & status,
296 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
297 & iwpos, iwposcb, iptrlu,
298 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
299 & ptlust_s, ptrfac,
300 & ptrast, step, pimaster, pamaster, nstk_s,
comp,
301 & iflag, ierror, comm,
302 & perm, ipool, lpool, leaf, nbfin,
myid, slavef,
303 &
304 & root, opassw, opeliw, itloc, rhs_mumps,
305 & fils, dad, ptrarw, ptraiw,
306 & intarr, dblarr,icntl,keep,keep8,dkeep,nd, frere_steps,
307 & lptrar, nelt, frtptr, frtelt,
308 & istep_to_iniv2, tab_pos_in_pere, .true.
309 & , lrgroups
310 & )
311 ioldps = ptrist(step(inode))
313 & ptrast(step(inode)), iw(ioldps+xxd), iw(ioldps+xxr),
314 & a_ptr, poselt, la_ptr )
315 lcont1 = iw( ioldps + keep(ixsz))
316 nass1 = iw( ioldps + 1 + keep(ixsz))
317 compress_panel = (iw(ioldps+xxlr).GE.2)
318 oocwrite_compatible_with_blr =
319 & ( .NOT.lr_activated.OR. (.NOT.compress_panel).OR.
320 & (keep(486).NE.2)
321 & )
322 IF ( nass1 < 0 ) THEN
323 nass1 = -nass1
324 iw( ioldps + 1 + keep(ixsz)) = nass1
325 IF (keep(55) .EQ. 0) THEN
327 & ioldps, a_ptr(poselt), la_ptr, 1_8, keep, keep8, itloc,
328 & fils, ptraiw,
329 & ptrarw, intarr, dblarr, keep8(27), keep8(26), rhs_mumps,
330 & lrgroups)
331 ELSE
333 & ioldps, a_ptr(poselt), la_ptr, 1_8, keep, keep8, itloc,
334 & fils, ptraiw,
335 & ptrarw, intarr, dblarr, keep8(27), keep8(26),
336 & frtptr, frtelt, rhs_mumps, lrgroups)
337 ENDIF
338 ENDIF
339 nrow1 = iw( ioldps + 2 +keep(ixsz))
340 npiv1 = iw( ioldps + 3 +keep(ixsz))
341 nslav1 = iw( ioldps + 5 + keep(ixsz))
342 hs = 6 + nslav1 + keep(ixsz)
343 ncol1 = lcont1 + npiv1
344 IF (npiv.GT.0) THEN
345 ict11 = ioldps+hs+nrow1+npiv1 - 1
346 DO i = 1, npiv
347 IF (iw(ipiv+i-1).EQ.i) cycle
348 isw = iw(ict11+i)
349 iw(ict11+i) = iw(ict11+iw(ipiv+i-1))
350 iw(ict11+iw(ipiv+i-1)) = isw
351 ipos = poselt + int(npiv1 + i - 1,8)
352 kpos = poselt + int(npiv1 + iw(ipiv+i-1) - 1,8)
353 CALL sswap(nrow1, a_ptr(ipos), ncol1, a_ptr(kpos), ncol1)
354 ENDDO
355 lpos2 = poselt + int(npiv1,8)
356 lpos = lpos2 + int(npiv,8)
357 IF ((.NOT. lr_activated).OR.keep(475).EQ.0) THEN
358 CALL strsm(
'L',
'L',
'N',
'N', npiv, nrow1, one,
359 & a(posblocfacto), ld_blocfacto,
360 & a_ptr(lpos2), ncol1)
361 ENDIF
362 ENDIF
363 compress_cb = .false.
364 IF ( lr_activated) THEN
365 compress_cb = ((iw(ioldps+xxlr).EQ.1).OR.
366 & (iw(ioldps+xxlr).EQ.3))
367 IF (compress_cb.AND.npiv.EQ.0) THEN
368 compress_cb = .false.
369 iw(ioldps+xxlr) = iw(ioldps+xxlr) -1
370 ENDIF
371 IF (npiv.NE.0) THEN
372 IF ( (npiv1.EQ.0)
373 & ) THEN
374 ioldps = ptrist(step(inode))
375 CALL get_cut(iw(ioldps+hs:ioldps+hs+nrow1-1), 0,
376 & nrow1, lrgroups, npartscb,
377 & npartsass, begs_blr_l)
378 CALL regrouping2(begs_blr_l, npartsass, 0, npartscb,
379 & nrow1-0, keep(488), .true., keep(472))
380 nb_blr_l = npartscb
381 IF (ipanel.EQ.1) THEN
382 begs_blr_col=>begs_blr_u
383 ELSE
384 ALLOCATE(begs_blr_col(size(begs_blr_u)+ipanel-1),
385 & stat=allocok)
386 IF (allocok > 0 ) THEN
387 iflag = -13
388 ierror = size(begs_blr_u)+ipanel-1
389 lp = icntl(1)
390 IF (icntl(4) .LE. 0) lp=-1
391 IF (lp > 0)
WRITE(lp,*)
myid,
392 & ': ERROR allocation during SMUMPS_PROCESS_BLOCFACTO'
393 GOTO 700
394 ENDIF
395 begs_blr_col(1:ipanel-1) = 1
396 DO i=1,size(begs_blr_u)
397 begs_blr_col(ipanel+i-1) = begs_blr_u(i)
398 ENDDO
399 ENDIF
400 info_tmp(1) = iflag
401 info_tmp(2) = ierror
402 IF (iflag.LT.0) GOTO 700
404 & .false.,
405 & .true.,
406 & .true.,
407 & npartsass_master,
408 & begs_blr_l,
409 & begs_blr_col,
410 & huge(npartsass_master),
411 & info_tmp)
412 iflag = info_tmp(1)
413 ierror = info_tmp(2)
414 IF (ipanel.NE.1) THEN
415 DEALLOCATE(begs_blr_col)
416 ENDIF
417 IF (iflag.LT.0) GOTO 700
418 ELSE
420 & begs_blr_l)
421 keep_begs_blr_l = .true.
422 nb_blr_l = size(begs_blr_l) - 2
423 npartsass = 1
424 npartscb = nb_blr_l
425 ENDIF
426 ENDIF
427 ENDIF
428 IF ( (npiv .GT. 0)
429 & ) THEN
430 IF (lr_activated) THEN
431 call max_cluster(begs_blr_l,nb_blr_l+1,maxi_cluster_l)
432 call max_cluster(begs_blr_u,nb_blr_u+1,maxi_cluster_u)
433 IF (lastbl.AND.compress_cb) THEN
434 maxi_cluster=
max(maxi_cluster_u+nelim,maxi_cluster_l)
435 ELSE
436 maxi_cluster=
max(maxi_cluster_u,maxi_cluster_l)
437 ENDIF
438 lwork = maxi_cluster*maxi_cluster
439 omp_num = 1
440#if defined(BLR_MT)
441
442#endif
443 ALLOCATE(block(maxi_cluster, omp_num*maxi_cluster),
444 & rwork(2*maxi_cluster*omp_num),
445 & tau(maxi_cluster*omp_num),
446 & jpvt(maxi_cluster*omp_num),
447 & work(lwork*omp_num), stat=allocok)
448 IF (allocok > 0 ) THEN
449 iflag = -13
450 ierror = maxi_cluster*omp_num*maxi_cluster
451 & + 2*maxi_cluster*omp_num
452 & + maxi_cluster*omp_num
453 & + maxi_cluster*omp_num
454 & + lwork*omp_num
455 lp = icntl(1)
456 IF (icntl(4) .LE. 0) lp=-1
457 IF (lp > 0)
WRITE(lp,*)
myid,
458 & ': ERROR allocation during SMUMPS_PROCESS_BLOCFACTO'
459 GOTO 700
460 ENDIF
461 current_blr=1
462 ALLOCATE(blr_l(nb_blr_l), stat=allocok)
463 IF (allocok > 0 ) THEN
464 iflag = -13
465 ierror = nb_blr_l
466 lp = icntl(1)
467 IF (icntl(4) .LE. 0) lp=-1
468 IF (lp > 0)
WRITE(lp,*)
myid,
469 & ': ERROR allocation during SMUMPS_PROCESS_BLOCFACTO'
470 GOTO 700
471 ENDIF
472#if defined(blr_mt)
473!$omp parallel
474#endif
476 & (a_ptr(poselt), la_ptr, 1_8,
477 & iflag, ierror, ncol1,
478 & begs_blr_l(1), size(begs_blr_l), nb_blr_l+1,
479 & dkeep(8), keep(466), keep(473),
480 & blr_l(1),
481 & current_blr, 'V', work, tau, jpvt, lwork, rwork,
482 & block, maxi_cluster, nelim,
483 & .true.,
484 & npiv, npiv1,
485 & 2, keep(483), keep8,
486 & omp_num )
487#if defined(BLR_MT)
488
489#endif
490 IF ( (keep(486).EQ.2)
491 & ) THEN
493 & iw(ioldps+xxf),
494 & 0,
495 & ipanel, blr_l)
496 ENDIF
497#if defined(BLR_MT)
498
499
500#endif
501 IF (iflag.LT.0) GOTO 300
502 IF (keep(475).GE.1) THEN
504 & ld_blocfacto, -6666,
505 & nb_blr_l+1,
506 & blr_l, current_blr, current_blr+1, nb_blr_l+1,
507 & 2, 0, 0,
508 & .true.)
509#if defined(BLR_MT)
510
511#endif
512 IF (keep(486).NE.2) THEN
514 & a_ptr(poselt), la_ptr, 1_8,
515 & ncol1, ncol1,
516 & .true.,
517 & npiv1+1,
518 & 1,
519 & nb_blr_l+1, blr_l(1), current_blr, 'V', 1)
520 ENDIF
521 ENDIF
522 300 CONTINUE
523#if defined(BLR_MT)
524
525#endif
526 IF (iflag.LT.0) GOTO 700
527 ENDIF
528 ENDIF
529 IF ( (keep(201).eq.1) .AND.
530 & (oocwrite_compatible_with_blr .OR. npiv.EQ.0) ) THEN
531 monbloc%INODE = inode
532 monbloc%MASTER = .false.
533 monbloc%Typenode = 2
534 monbloc%NROW = nrow1
535 monbloc%NCOL = ncol1
536 monbloc%NFS = nass1
537 monbloc%LastPiv = npiv1 + npiv
538 monbloc%LastPanelWritten_L = -9999
539 monbloc%LastPanelWritten_U = -9999
540 NULLIFY(monbloc%INDICES)
541 monbloc%Last = lastbl
543 nextpivdummy = -8888
544 liwfac = iw(ioldps+xxi)
545 last_call = .false.
547 & a_ptr(poselt),
548 & la_ptr, monbloc, nextpivdummy, nextpivdummy,
549 & iw(ioldps), liwfac,
myid, keep8(31), iflag,last_call)
550 ENDIF
551 IF ( (npiv .GT. 0)
552 & ) THEN
553 IF (lr_activated) THEN
554 IF (nelim.GT.0) THEN
555 upos = 1_8+int(npiv,8)
557 & a(posblocfacto), la_blocfacto, upos,
558 & a_ptr(poselt), la_ptr, lpos-poselt+1_8,
559 & iflag, ierror, ld_blocfacto, ncol1,
560 & begs_blr_l(1), size(begs_blr_l),
561 & current_blr, blr_l(1), nb_blr_l+1,
562 & current_blr+1, nelim, 'N')
563 ENDIF
564#if defined(BLR_MT)
565
566#endif
568 & a_ptr(poselt), la_ptr, 1_8,
569 & iflag, ierror, ncol1,
570 & begs_blr_l(1), size(begs_blr_l),
571 & begs_blr_u(1), size(begs_blr_u), current_blr,
572 & blr_l(1), nb_blr_l+1,
573 & blr_u(1), nb_blr_u+1,
574 & 0,
575 & .true.,
576 & npiv1,
577 & 2, 0,
578 & keep(481), dkeep(11), keep(466), keep(477)
579 & )
580#if defined(BLR_MT)
581
582#endif
583 IF (iflag.LT.0) GOTO 700
584 ELSE
585 upos = posblocfacto+int(npiv,8)
586 CALL sgemm(
'N',
'N', ncol-npiv, nrow1, npiv,
587 &
alpha,a(upos), ncol,
588 & a_ptr(lpos2), ncol1, one, a_ptr(lpos), ncol1)
589 ENDIF
590 ENDIF
591 iw(ioldps+keep(ixsz) ) = iw(ioldps+keep(ixsz) ) - npiv
592 iw(ioldps + 3+keep(ixsz) ) = iw(ioldps+3+keep(ixsz) ) + npiv
593 IF (lastbl) THEN
594 iw(ioldps+1+keep(ixsz) ) = iw(ioldps + 3+keep(ixsz) )
595 ENDIF
596 IF ( .not. lastbl .AND.
597 & (iw(ioldps+1+keep(ixsz)) .EQ. iw(ioldps + 3+keep(ixsz))) ) THEN
598 write(*,*) 'Internal ERROR 1 **** IN BLACFACTO '
600 ENDIF
601 IF (lr_activated) THEN
602 IF ((npiv.GT.0)
603 & ) THEN
605 DEALLOCATE(blr_u)
606 IF (keep(486).EQ.3) THEN
608 DEALLOCATE(blr_l)
609 ELSE
611 & )
612 ENDIF
613 ENDIF
614 ENDIF
615 lrlu = lrlu + la_blocfacto
616 lrlus = lrlus + la_blocfacto
617 keep8(69) = keep8(69) - la_blocfacto
618 posfac = posfac - la_blocfacto
620 & la-lrlus,0_8,-la_blocfacto,keep,keep8,lrlus)
621 iwpos = iwpos - npiv
622 flop1 = dble( npiv1*nrow1 ) +
623 & dble(nrow1*npiv1)*dble(2*ncol1-npiv1-1)
624 & -
625 & dble((npiv1+npiv)*nrow1 ) -
626 & dble(nrow1*(npiv1+npiv))*dble(2*ncol1-npiv1-npiv-1)
628 IF (lastbl) THEN
629 IF (keep(486).NE.0) THEN
630 IF (lr_activated) THEN
632 & keep(50), inode)
633 ELSE
635 & keep(50), inode)
636 ENDIF
637 ENDIF
638 IF (lr_activated) THEN
639 IF (compress_cb) THEN
641 & begs_blr_col, npartsass_master_aux)
642 begs_blr_col(1+npartsass_master) =
643 & begs_blr_col(1+npartsass_master) - nelim
644 nb_blr_col = size(begs_blr_col) - 1
645 IF (npiv.EQ.0) THEN
646 call max_cluster(begs_blr_l,nb_blr_l+1,maxi_cluster_l)
647 call max_cluster(begs_blr_col,nb_blr_col,maxi_cluster_col)
648 IF (compress_cb) THEN
649 maxi_cluster=
max(maxi_cluster_col+nelim,maxi_cluster_l)
650 ELSE
651 maxi_cluster=
max(maxi_cluster_col,maxi_cluster_l
652 ENDIF
653 lwork = maxi_cluster*maxi_cluster
654 omp_num = 1
655#if defined(BLR_MT)
656
657#endif
658 ALLOCATE(block(maxi_cluster, omp_num*maxi_cluster),
659 & rwork(2*maxi_cluster*omp_num),
660 & tau(maxi_cluster*omp_num),
661 & jpvt(maxi_cluster*omp_num),
662 & work(lwork*omp_num), stat=allocok)
663 IF (allocok > 0 ) THEN
664 iflag = -13
665 ierror = maxi_cluster*omp_num*maxi_cluster
666 & + 2*maxi_cluster*omp_num
667 & + maxi_cluster*omp_num
668 & + maxi_cluster*omp_num
669 & + lwork*omp_num
670 lp = icntl(1)
671 IF (icntl(4) .LE. 0) lp=-1
672 IF (lp > 0)
WRITE(lp,*)
myid,
673 & ': ERROR allocation during SMUMPS_PROCESS_BLOCFACTO'
674 GOTO 700
675 ENDIF
676 ENDIF
677 allocate(cb_lrb(nb_blr_l,nb_blr_col-npartsass_master),
678 & stat=allocok)
679 IF (allocok > 0) THEN
680 iflag = -13
681 ierror = nb_blr_l*(nb_blr_col-npartsass_master)
682 GOTO 700
683 ENDIF
685 ENDIF
686#if defined(BLR_MT)
687!$omp parallel
688#endif
689 IF (compress_cb) THEN
691 & a_ptr(poselt), la_ptr, 1_8, ncol1,
692 & begs_blr_l(1), size(begs_blr_l),
693 & begs_blr_col(1), size(begs_blr_col),
694 & nb_blr_l, nb_blr_col-npartsass_master,
695 & npartsass_master,
696 & nrow1, ncol1-npiv1-npiv, inode,
697 & iw(ioldps+xxf), 0, 2, iflag, ierror,
698 & dkeep(12), keep(466), keep(484), keep(489),
699 & cb_lrb(1,1),
700 & work, tau, jpvt, lwork, rwork, block,
701 & maxi_cluster, keep8, omp_num,
702 & -9999, -9999, -9999, keep(1),
703 & idummy, 0, -9999 )
704#if defined(BLR_MT)
705
706#endif
707 ENDIF
708#if defined(BLR_MT)
709
710#endif
711 IF (iflag.LT.0) GOTO 700
712 ENDIF
714 & comm_load, ass_irecv,
715 & n, inode, fpere,
716 & root,
718 &
719 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
720 & iwpos, iwposcb, iptrlu, lrlu, lrlus, iw, liw, a, la,
721 & ptrist, ptlust_s, ptrfac, ptrast, step, pimaster,
722 & pamaster,
723 & nstk_s,
comp, iflag, ierror, perm,
724 & ipool, lpool, leaf, nbfin, slavef,
725 & opassw, opeliw, itloc, rhs_mumps, fils, dad, ptrarw, ptraiw,
726 & intarr, dblarr,icntl,keep,keep8,dkeep,nd, frere_steps,
727 & lptrar, nelt, frtptr, frtelt,
728 & istep_to_iniv2, tab_pos_in_pere
729 & , lrgroups
730 & )
731 ENDIF
732 IF (lr_activated) THEN
733 IF (allocated(rwork)) DEALLOCATE(rwork)
734 IF (allocated(work)) DEALLOCATE(work)
735 IF (allocated(tau)) DEALLOCATE(tau)
736 IF (allocated(jpvt)) DEALLOCATE(jpvt)
737 IF (allocated(block)) DEALLOCATE(block)
738 IF (associated(begs_blr_l)) THEN
739 IF (.NOT. keep_begs_blr_l) DEALLOCATE(begs_blr_l)
740 ENDIF
741 IF ((npiv.GT.0)
742 & ) THEN
743 IF (associated(begs_blr_u)) DEALLOCATE(begs_blr_u)
744 ENDIF
745 ENDIF
746 600 CONTINUE
747 RETURN
748 700 CONTINUE
750 RETURN
subroutine sswap(n, sx, incx, sy, incy)
SSWAP
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
integer, public strat_try_write
subroutine get_cut(iwr, nass, ncb, lrgroups, npartscb, npartsass, cut)
subroutine smumps_dm_set_dynptr(cb_state, a, la, pamaster_or_ptrast, ixxd, ixxr, son_a, iachk, recsize)
subroutine smumps_blr_panel_lrtrsm(a, la, poselt, nfront, ibeg_block, nb_blr, blr_loru, current_blr, first_block, last_block, niv, sym, loru, lbandslave, iw, offset_iw, nass)
double precision, save, private alpha
subroutine, public smumps_load_mem_update(ssarbr, process_bande_arg, mem_value, new_lu, inc_mem_arg, keep, keep8, lrlus)
integer, save, private myid
subroutine, public smumps_load_update(check_flops, process_bande, inc_load, keep, keep8)
subroutine max_cluster(cut, cut_size, maxi_cluster)
subroutine regrouping2(cut, npartsass, nass, npartscb, ncb, ibcksz, onlycb, k472)
subroutine, public smumps_blr_save_panel_loru(iwhandler, loru, ipanel, lrb_panel)
subroutine, public smumps_blr_retrieve_begs_blr_c(iwhandler, begs_blr_col, nb_panels)
subroutine, public smumps_blr_save_init(iwhandler, issym, ist2, isslave, nb_panels, begs_blr_l, begs_blr_col, nb_accesses_init, info)
subroutine, public smumps_blr_save_cb_lrb(iwhandler, cb_lrb)
subroutine, public smumps_blr_retrieve_begs_blr_l(iwhandler, begs_blr_l)
subroutine upd_mry_lu_lrgain(blr_panel, nbblocks)
subroutine stats_compute_flop_slave_type2(nrow1, ncol1, nass1, keep50, inode)
subroutine upd_flop_frfront_slave(nrow1, ncol1, nass1, keep50, inode)
subroutine dealloc_blr_panel(blr_panel, iend, keep8, k34, ibeg_in)
subroutine smumps_bdc_error(myid, slavef, comm, keep)
subroutine smumps_asm_slave_arrowheads(inode, n, iw, liw, ioldps, a, la, poselt, keep, keep8, itloc, fils, ptraiw, ptrarw, intarr, dblarr, lintarr, ldblarr, rhs_mumps, lrgroups)
subroutine smumps_asm_slave_elements(inode, n, nelt, iw, liw, ioldps, a, la, poselt, keep, keep8, itloc, fils, ptraiw, ptrarw, intarr, dblarr, lintarr, ldblarr, frt_ptr, frt_elt, rhs_mumps, 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)
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_mpi_unpack_lr(bufr, lbufr, lbufr_bytes, position, npiv, nelim, dir, blr_u, nb_block_u, begs_blr_u, keep8, comm, ierr, iflag, ierror)
recursive subroutine smumps_end_facto_slave(comm_load, ass_irecv, n, inode, fpere, root, 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, nd, frere, lptrar, nelt, frtptr, frtelt, istep_to_iniv2, tab_pos_in_pere, lrgroups)
recursive subroutine smumps_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)