OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cfac_process_band.F
Go to the documentation of this file.
1C
2C This file is part of MUMPS 5.5.1, released
3C on Tue Jul 12 13:17:24 UTC 2022
4C
5C
6C Copyright 1991-2022 CERFACS, CNRS, ENS Lyon, INP Toulouse, Inria,
7C Mumps Technologies, University of Bordeaux.
8C
9C This version of MUMPS is provided to you free of charge. It is
10C released under the CeCILL-C license
11C (see doc/CeCILL-C_V1-en.txt, doc/CeCILL-C_V1-fr.txt, and
12C https://cecill.info/licences/Licence_CeCILL-C_V1-en.html)
13C
14 SUBROUTINE cmumps_process_desc_bande( MYID, BUFR, LBUFR,
15 & LBUFR_BYTES,
16 & IWPOS, IWPOSCB,
17 & IPTRLU, LRLU, LRLUS,
18 & N, IW, LIW, A, LA, SLAVEF, PROCNODE_STEPS, DAD,
19 & PTRIST, PTRAST, STEP, PIMASTER, PAMASTER, COMP,
20 & KEEP,KEEP8, DKEEP, ITLOC, RHS_MUMPS, ISTEP_TO_INIV2,
21#if ! defined(NO_FDM_DESCBAND)
22 & iwhandler_in,
23#endif
24 & iflag, ierror )
25 USE cmumps_load
28#if ! defined(NO_FDM_DESCBAND)
30#endif
31 IMPLICIT NONE
32 INTEGER MYID
33 INTEGER KEEP(500)
34 INTEGER(8) KEEP8(150)
35 REAL DKEEP(230)
36 INTEGER LBUFR, LBUFR_BYTES
37 INTEGER BUFR( LBUFR )
38 INTEGER(8) :: IPTRLU, LRLU, LRLUS, LA
39 INTEGER IWPOS, IWPOSCB, N, LIW
40 INTEGER IW( LIW )
41 COMPLEX A( LA )
42 INTEGER, INTENT(IN) :: SLAVEF
43 INTEGER, INTENT(IN) :: PROCNODE_STEPS(KEEP(28)), DAD(KEEP(28))
44 INTEGER(8) :: PAMASTER(KEEP(28))
45 INTEGER(8) :: PTRAST(KEEP(28))
46 INTEGER PTRIST(KEEP(28)), STEP(N),
47 & pimaster(keep(28)),
48 & itloc( n + keep(253) )
49 COMPLEX :: RHS_MUMPS(KEEP(255))
50 INTEGER :: ISTEP_TO_INIV2(KEEP(71))
51#if ! defined(NO_FDM_DESCBAND)
52 INTEGER IWHANDLER_IN
53#endif
54 INTEGER COMP, IFLAG, IERROR
55 INTEGER INODE, NBPROCFILS, NCOL, NROW, NASS, NSLAVES
56 INTEGER NSLAVES_HDR, NFRONT
57 INTEGER LREQ
58 INTEGER :: IBUFR
59 INTEGER(8) :: LREQCB
60#if ! defined(NO_FDM_DESCBAND)
61 INTEGER :: IWHANDLER_LOC
62#endif
63 DOUBLE PRECISION FLOP1
64 include 'mumps_headers.h'
65#if ! defined(NO_FDM_DESCBAND)
66 INTEGER :: INFO_TMP(2)
67#else
68#endif
69 INTEGER :: LRSTATUS
70 INTEGER :: ESTIM_NFS4FATHER_ATSON
71 LOGICAL :: LR_ACTIVATED, COMPRESS_CB
72 COMPLEX, POINTER, DIMENSION(:) :: DYNAMIC_CB
73 INTEGER(8) :: TMP_ADDRESS
74 INTEGER :: allocok
75 INODE = bufr( 2 )
76 nbprocfils = bufr( 3 )
77 nrow = bufr( 4 )
78 ncol = bufr( 5 )
79 nass = bufr( 6 )
80 nfront = bufr( 7 )
81 nslaves_hdr = bufr( 8 )
82 nslaves = bufr( 9 )
83 lrstatus = bufr(10 )
84 estim_nfs4father_atson = bufr(11)
85 ibufr = 12
86#if ! defined(NO_FDM_DESCBAND)
87 iwhandler_loc = iwhandler_in
88 IF ((iwhandler_in .LE. 0) .AND.
89 & (inode .NE. inode_waited_for)) THEN
90 info_tmp=0
91 CALL mumps_fdbd_save_descband(inode, bufr(1), bufr,
92 & iwhandler_loc, info_tmp)
93 IF (info_tmp(1) < 0) THEN
94 iflag = info_tmp(1)
95 ierror = info_tmp(2)
96 RETURN
97 ENDIF
98 GOTO 555
99 ENDIF
100#endif
101 IF ( keep(50) .eq. 0 ) THEN
102 flop1 = dble( nass * nrow ) +
103 & dble(nrow*nass)*dble(2*ncol-nass-1)
104 ELSE
105 flop1 = dble( nass ) * dble( nrow )
106 & * dble( 2 * ncol - nrow - nass + 1)
107 END IF
108 CALL cmumps_load_update(1,.true.,flop1, keep,keep8)
109 IF ( keep(50) .eq. 0 ) THEN
110 nslaves = nslaves_hdr + xtra_slaves_unsym
111 ELSE
112 nslaves = nslaves_hdr + xtra_slaves_sym
113 END IF
114 lreq = nrow + ncol + 6 + nslaves + keep(ixsz)
115 lreqcb = int(ncol,8) * int(nrow,8)
116 IF ( lreqcb .GT. lrlus .AND. keep(101) .EQ. 0 .AND.
117 & keep8(73) + lreqcb .LE. keep8(75) ) THEN
118 CALL cmumps_alloc_cb(.false., 0_8, .false.,.true.,
119 & myid,n, keep, keep8, dkeep, iw, liw, a, la,
120 & lrlu, iptrlu,iwpos,iwposcb, slavef, procnode_steps, dad,
121 & ptrist,ptrast, step, pimaster,pamaster,
122 & lreq, 0_8,
123 & inode, s_active, .true.,
124 & comp, lrlus, keep8(67), iflag, ierror
125 & )
126 IF ( iflag .LT. 0 ) RETURN
127#if defined(MUMPS_ALLOC_FROM_C)
128 CALL mumps_malloc_c( tmp_address,
129 & lreqcb * int(keep(35),8) )
130 IF (tmp_address .EQ. 0_8) THEN
131 allocok=1
132 ELSE
133 allocok=0
134 ENDIF
135#else
136 ALLOCATE(dynamic_cb(lreqcb), stat=allocok)
137#endif
138 IF (allocok .GT. 0) THEN
139 CALL cmumps_free_block_cb_static( .false., myid, n,
140 & iwposcb + 1, iw, liw, lrlu, lrlus, iptrlu, iwposcb,
141 & la, keep, keep8, .false. )
142 ELSE
143 CALL mumps_dm_fac_upd_dyn_memcnts( lreqcb,
144 & keep(405).EQ.1,
145 & keep8, iflag, ierror,
146 & .true.,
147 & .false. )
148#if ! defined(MUMPS_ALLOC_FROM_C)
149 CALL mumps_addr_c( dynamic_cb(1), tmp_address )
150#endif
151 CALL mumps_storei8(lreqcb, iw(iwposcb+1+xxd))
152 ptrist(step(inode)) = iwposcb + 1
153 ptrast(step(inode)) = tmp_address
154 ENDIF
155 ENDIF
156 IF ( ptrist(step(inode)) .EQ. 0 ) THEN
157 CALL cmumps_alloc_cb(.false., 0_8, .false.,.true.,
158 & myid,n, keep, keep8, dkeep, iw, liw, a, la,
159 & lrlu, iptrlu,iwpos,iwposcb, slavef, procnode_steps, dad,
160 & ptrist,ptrast, step, pimaster,pamaster,
161 & lreq, lreqcb, inode, s_active, .true.,
162 & comp, lrlus, keep8(67), iflag, ierror
163 & )
164 IF ( iflag .LT. 0 ) RETURN
165 ptrist(step(inode)) = iwposcb + 1
166 ptrast(step(inode)) = iptrlu + 1_8
167 ENDIF
168# if ! defined(NO_FDM_DESCBAND)
169 555 CONTINUE
170# endif
171# if ! defined(NO_FDM_DESCBAND)
172 IF ((iwhandler_in .LE. 0) .AND.
173 & (inode .NE. inode_waited_for)) THEN
174 RETURN
175 ENDIF
176 iw(iwposcb+1+xxa) = iwhandler_loc
177# endif
178 iw(iwposcb+1+xxf) = -9999
179 iw( iwposcb + 1+keep(ixsz) ) = ncol
180 iw( iwposcb + 2+keep(ixsz) ) = - nass
181 iw( iwposcb + 3+keep(ixsz) ) = nrow
182 iw( iwposcb + 4+keep(ixsz) ) = 0
183 iw( iwposcb + 5+keep(ixsz) ) = nass
184 iw( iwposcb + 6+keep(ixsz) ) = nslaves
185 iw( iwposcb + 7+keep(ixsz)+nslaves :
186 & iwposcb + 6+keep(ixsz)+nslaves + nrow + ncol )
187 &= bufr( ibufr + nslaves_hdr :
188 & ibufr + nslaves_hdr + nrow + ncol - 1 )
189 IF ( keep(50) .eq. 0 ) THEN
190 iw( iwposcb + 7+keep(ixsz) ) = s_rootband_init
191 IF (nslaves_hdr.GT.0) THEN
192 write(6,*) " Internal error in CMUMPS_PROCESS_DESC_BANDE "
193 CALL mumps_abort()
194 ENDIF
195 ELSE
196 iw( iwposcb+7+keep(ixsz) ) = huge(iw(iwposcb+7+keep(ixsz)))
197 iw( iwposcb + 8+keep(ixsz) ) = nfront
198 iw( iwposcb + 9+keep(ixsz) ) = s_rootband_init
199 iw( iwposcb + 7+xtra_slaves_sym+keep(ixsz):
200 & iwposcb + 6+xtra_slaves_sym+keep(ixsz)+nslaves_hdr ) =
201 & bufr( ibufr: ibufr - 1 + nslaves_hdr )
202 END IF
203 iw(iwposcb+1+xxnbpr)=nbprocfils
204 iw(iwposcb+1+xxlr)=lrstatus
205 compress_cb = ((lrstatus.EQ.1).OR.
206 & (lrstatus.EQ.3))
207 lr_activated = (lrstatus.GT.0)
208 IF (lr_activated.AND.
209 & (keep(480).NE.0
210 & .OR.
211 & (
212 & (keep(486).EQ.2)
213 & )
214 & .OR.compress_cb
215 & )) THEN
216 info_tmp=0
217 CALL cmumps_blr_init_front (iw(iwposcb+1+xxf), info_tmp)
218 IF (info_tmp(1).LT.0) THEN
219 iflag = info_tmp(1)
220 ierror = info_tmp(2)
221 RETURN
222 ENDIF
223 IF (compress_cb.AND.
224 & (keep(219).NE.0).AND.(keep(50).EQ.2).AND.
225 & (estim_nfs4father_atson.GE.0)
226 & ) THEN
227 CALL cmumps_blr_save_nfs4father ( iw(iwposcb+1+xxf),
228 & estim_nfs4father_atson )
229 ENDIF
230 ENDIF
231 IF (nbprocfils .EQ. 0) THEN
232 ENDIF
233 RETURN
234 END SUBROUTINE cmumps_process_desc_bande
235 RECURSIVE SUBROUTINE cmumps_treat_descband( INODE,
236 & COMM_LOAD, ASS_IRECV,
237 & BUFR, LBUFR, LBUFR_BYTES, PROCNODE_STEPS, POSFAC,
238 & IWPOS, IWPOSCB, IPTRLU,
239 & LRLU, LRLUS, N, IW, LIW, A, LA, PTRIST,
240 & PTLUST, PTRFAC,
241 & PTRAST, STEP, PIMASTER, PAMASTER, NSTK_S, COMP,
242 & IFLAG, IERROR, COMM, PERM,
243 & IPOOL, LPOOL, LEAF, NBFIN, MYID, SLAVEF,
244 &
245 & root, OPASSW, OPELIW, ITLOC, RHS_MUMPS,
246 & FILS, DAD, PTRARW, PTRAIW,
247 & INTARR, DBLARR, ICNTL, KEEP,KEEP8,DKEEP, ND, FRERE,
248 & LPTRAR, NELT, FRTPTR, FRTELT,
249 &
250 & ISTEP_TO_INIV2, TAB_POS_IN_PERE,
251 & STACK_RIGHT_AUTHORIZED
252 & , LRGROUPS
253 & )
254# if ! defined(NO_FDM_DESCBAND)
256# endif
257 USE cmumps_struc_def, ONLY : cmumps_root_struc
258 IMPLICIT NONE
259 INTEGER, INTENT(IN) :: inode
260 TYPE (cmumps_root_struc) :: root
261 INTEGER keep(500), icntl(60)
262 INTEGER(8) keep8(150)
263 REAL dkeep(230)
264 INTEGER lbufr, lbufr_bytes
265 INTEGER comm_load, ass_irecv
266 INTEGER bufr( lbufr )
267 INTEGER(8) :: la, posfac, iptrlu, lrlu, lrlus
268 INTEGER iwpos, iwposcb
269 INTEGER n, liw
270 INTEGER iw( liw )
271 COMPLEX A( la )
272 INTEGER, intent(in) :: LRGROUPS(n)
273 INTEGER(8) :: ptrast(keep(28))
274 INTEGER(8) :: ptrfac(keep(28))
275 INTEGER(8) :: pamaster(keep(28))
276 INTEGER ptrist( keep(28) ),
277 & ptlust(keep(28))
278 INTEGER step(n),
279 & pimaster(keep(28))
280 INTEGER comp
281 INTEGER nstk_s(keep(28)), procnode_steps( keep(28) )
282 INTEGER perm(n)
283 INTEGER iflag, ierror, comm
284 INTEGER lpool, leaf
285 INTEGER ipool( lpool )
286 INTEGER myid, slavef, nbfin
287 DOUBLE PRECISION opassw, opeliw
288 INTEGER nelt, lptrar
289 INTEGER frtptr( n+1 ), frtelt( nelt )
290 INTEGER itloc( n + keep(253) ), fils( n ), dad( keep(28) )
291 COMPLEX :: rhs_mumps(keep(255))
292 INTEGER(8), INTENT(IN) :: ptrarw( lptrar ), ptraiw( lptrar )
293 INTEGER nd( keep(28) ), frere( keep(28) )
294 INTEGER istep_to_iniv2(keep(71)),
295 & tab_pos_in_pere(slavef+2,max(1,keep(56)))
296 COMPLEX dblarr( keep8(26) )
297 INTEGER intarr( keep8(27) )
298 LOGICAL, intent(in) :: stack_right_authorized
299 include 'mpif.h'
300 include 'mumps_tags.h'
301 include 'mumps_headers.h'
302 LOGICAL :: blocking, set_irecv, message_received
303 INTEGER :: status(mpi_status_size)
304 INTEGER :: src_descband
305#if ! defined(NO_FDM_DESCBAND)
306 INTEGER :: iwhandler
307 TYPE(descband_struc_t), POINTER :: descband_struc
308#endif
309 INTEGER mumps_procnode
310 EXTERNAL mumps_procnode
311 src_descband = mumps_procnode( procnode_steps(step(inode)),
312 & keep(199) )
313# if ! defined(NO_FDM_DESCBAND)
314 IF (mumps_fdbd_is_descband_stored( inode, iwhandler )) THEN
315 CALL mumps_fdbd_retrieve_descband(iwhandler, descband_struc)
316 CALL cmumps_process_desc_bande( myid, descband_struc%BUFR(1),
317 & descband_struc%LBUFR,
318 & lbufr_bytes,
319 & iwpos, iwposcb,
320 & iptrlu, lrlu, lrlus,
321 & n, iw, liw, a, la, slavef, procnode_steps, dad,
322 & ptrist, ptrast, step, pimaster, pamaster, comp,
323 & keep, keep8, dkeep, itloc, rhs_mumps, istep_to_iniv2,
324 & iwhandler,
325 & iflag, ierror )
326 IF (iflag .LT. 0) GOTO 500
327 CALL mumps_fdbd_free_descband_struc(iw(ptrist(step(inode))+xxa))
328 ELSE
329 IF (inode_waited_for.GT.0) THEN
330 WRITE(*,*) " Internal error 1 in CMUMPS_TREAT_DESCBAND",
331 & inode, inode_waited_for
332 CALL mumps_abort()
333 ENDIF
334 inode_waited_for = inode
335# endif
336 DO WHILE (ptrist(step(inode)) .EQ. 0)
337 blocking = .true.
338 set_irecv = .false.
339 message_received = .false.
340 CALL cmumps_try_recvtreat(comm_load,
341 & ass_irecv, blocking, set_irecv, message_received,
342 & src_descband, maitre_desc_bande,
343 & status,
344 & bufr, lbufr, lbufr_bytes, procnode_steps, posfac,
345 & iwpos, iwposcb, iptrlu,
346 & lrlu, lrlus, n, iw, liw, a, la, ptrist,
347 & ptlust, ptrfac,
348 & ptrast, step, pimaster, pamaster, nstk_s, comp,
349 & iflag, ierror, comm,
350 & perm, ipool, lpool, leaf,
351 & nbfin, myid, slavef,
352 & root, opassw, opeliw, itloc, rhs_mumps,
353 & fils, dad, ptrarw, ptraiw,
354 & intarr, dblarr, icntl, keep,keep8,dkeep, nd, frere,
355 & lptrar, nelt, frtptr, frtelt,
356 & istep_to_iniv2, tab_pos_in_pere, .true.
357 & , lrgroups
358 & )
359 IF (iflag .LT. 0) THEN
360 RETURN
361 ENDIF
362 ENDDO
363# if ! defined(NO_FDM_DESCBAND)
365 ENDIF
366# endif
367 RETURN
368 500 CONTINUE
369 CALL cmumps_bdc_error( myid, slavef, comm, keep )
370 RETURN
371 END SUBROUTINE cmumps_treat_descband
#define mumps_abort
Definition VE_Metis.h:25
subroutine cmumps_bdc_error(myid, slavef, comm, keep)
Definition cbcast_int.F:38
subroutine cmumps_alloc_cb(inplace, min_space_in_place, ssarbr, process_bande, myid, n, keep, keep8, dkeep, iw, liw, a, la, lrlu, iptrlu, iwpos, iwposcb, slavef, procnode_steps, dad, ptrist, ptrast, step, pimaster, pamaster, lreq, lreqcb, node_arg, state_arg, set_header, comp, lrlus, lrlusm, iflag, ierror)
subroutine cmumps_free_block_cb_static(ssarbr, myid, n, iposblock, iw, liw, lrlu, lrlus, iptrlu, iwposcb, la, keep, keep8, in_place_stats)
recursive subroutine cmumps_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 cmumps_process_desc_bande(myid, bufr, lbufr, lbufr_bytes, iwpos, iwposcb, iptrlu, lrlu, lrlus, n, iw, liw, a, la, slavef, procnode_steps, dad, ptrist, ptrast, step, pimaster, pamaster, comp, keep, keep8, dkeep, itloc, rhs_mumps, istep_to_iniv2, iwhandler_in, iflag, ierror)
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)
#define max(a, b)
Definition macros.h:21
subroutine, public cmumps_load_update(check_flops, process_bande, inc_load, keep, keep8)
subroutine, public cmumps_blr_init_front(iwhandler, info, mtk405)
subroutine, public cmumps_blr_save_nfs4father(iwhandler, nfs4father)
subroutine, public mumps_fdbd_retrieve_descband(iwhandler, descband_struc)
subroutine, public mumps_fdbd_free_descband_struc(iwhandler)
logical function, public mumps_fdbd_is_descband_stored(inode, iwhandler)
integer, save, public inode_waited_for
subroutine, public mumps_fdbd_save_descband(inode, lbufr, bufr, iwhandler, info)
int comp(int a, int b)
subroutine mumps_storei8(i8, int_array)
integer function mumps_procnode(procinfo_inode, k199)
subroutine mumps_dm_fac_upd_dyn_memcnts(mem_count_allocated, atomic_updates, keep8, iflag, ierror, k69upd, k71upd)