OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dmumps_fac_omp_m Module Reference

Functions/Subroutines

subroutine dmumps_fac_l0_omp (n, liw, nstk_steps, nd, fils, step, frere, dad, istep_to_iniv2, tab_pos_in_pere, ptrist, ptrast, pimaster, pamaster, ptrarw, ptraiw, itloc, rhs_mumps, rinfo, nbroot, nbrtot, nbroot_under_l0, uu, icntl, ptlust_s, ptrfac, info, keep, keep8, procnode_steps, slavef, comm_nodes, myid_nodes, bufr, lbufr, lbufr_bytes, intarr, dblarr, root, perm, nelt, frtptr, frtelt, lptrar, comm_load, ass_irecv, seuil, seuil_ldlt_niv2, mem_distrib, ne, dkeep, pivnul_list, lpn_list, lpool_b_l0_omp, ipool_b_l0_omp, l_virt_l0_omp, virt_l0_omp, virt_l0_omp_mapping, l_phys_l0_omp, phys_l0_omp, perm_l0_omp, ptr_leafs_l0_omp, l0_omp_mapping, ll0_omp_mapping, thread_la, mumps_tps_arr, dmumps_tps_arr, nstepsw, opassw, opeliw, nelvaw, comp, maxfrw, nmaxnpivw, npvw, noffnegw, nb22t1w, nbtinyw, det_expw, det_mantw, det_signw, lrgroups, l0_omp_factors, ll0_omp_factors, i4_l0_omp, nbstats_i4, nbcols_i4, i8_l0_omp, nbstats_i8, nbcols_i8)
subroutine dmumps_set_maxs_maxis_thread (maxs_base_relaxed8th, maxis_base_relaxedth, blr_strat, keep, i4_l0_ompth, nbstats_i4, i8_l0_ompth, nbstats_i8)
subroutine dmumps_ma_eff_mem_dispo (mumps_tps_arr, nbthreads, keep8, keep, n, blr_strat, lpool_p, i8_l0_omp, nbstats_i8, memdispo_underl0)
subroutine dmumps_l0omp_copy_iw (iw, liw, iwpos, mumps_tps_arr, keep, ptlust, icntl, info)
subroutine dmumps_perform_copies_init (state, keep8_77_save, nbwaitmem, nbfinished, nbongoingcopies, nbunderl0, keep, keep8)
subroutine dmumps_perform_copies (thread_id_p, mumps_tps_arr, dmumps_tps_arr, l0_omp_factors, ll0_omp_factors, state, size_copied, nbwaitmem, nbfinished, nbongoingcopies, nbunderl0, myid_nodes, n, slavef, step, ptrast, pamaster, procnode_steps, dad, keep, keep8, info_p)

Variables

integer(8), parameter underl0 = -20_8
integer(8), parameter copynotstarted = -19_8
integer(8), parameter waitmem = -18_8
integer(8), parameter copyfactorsfinished = -17_8
integer(8), parameter allocatevidercbencours = -16_8
integer(8), parameter finished = -15_8

Function/Subroutine Documentation

◆ dmumps_fac_l0_omp()

subroutine dmumps_fac_omp_m::dmumps_fac_l0_omp ( integer n,
integer liw,
integer, dimension(keep(28)) nstk_steps,
integer, dimension(keep(28)) nd,
integer, dimension(n) fils,
integer, dimension(n) step,
integer, dimension(keep(28)) frere,
integer, dimension(keep(28)) dad,
integer, dimension(keep(71)) istep_to_iniv2,
integer, dimension(slavef+2,max(1,keep(56))) tab_pos_in_pere,
integer, dimension(keep(28)) ptrist,
integer(8), dimension(keep(28)) ptrast,
integer, dimension(keep(28)) pimaster,
integer(8), dimension(keep(28)) pamaster,
integer(8), dimension(lptrar), intent(in) ptrarw,
integer(8), dimension(lptrar), intent(in) ptraiw,
integer, dimension(n+keep(253)) itloc,
double precision, dimension(keep(255)) rhs_mumps,
double precision, dimension(40) rinfo,
integer nbroot,
integer nbrtot,
integer, intent(out) nbroot_under_l0,
double precision uu,
integer, dimension(60) icntl,
integer, dimension(keep(28)) ptlust_s,
integer(8), dimension(keep(28)) ptrfac,
integer, dimension(80) info,
integer, dimension(500) keep,
integer(8), dimension(150) keep8,
integer, dimension(keep(28)) procnode_steps,
integer slavef,
integer comm_nodes,
integer myid_nodes,
integer, dimension( lbufr ) bufr,
integer lbufr,
integer lbufr_bytes,
integer, dimension( keep8(27) ) intarr,
double precision, dimension( keep8(26) ) dblarr,
type (dmumps_root_struc) root,
integer, dimension(n) perm,
integer nelt,
integer, dimension( n+1 ) frtptr,
integer, dimension( nelt ) frtelt,
integer lptrar,
integer comm_load,
integer ass_irecv,
double precision seuil,
double precision seuil_ldlt_niv2,
integer, dimension(0: slavef - 1) mem_distrib,
integer, dimension(keep(28)) ne,
double precision, dimension(230) dkeep,
integer, dimension(lpn_list) pivnul_list,
integer lpn_list,
integer, intent(in) lpool_b_l0_omp,
integer, dimension ( lpool_b_l0_omp ), intent(in) ipool_b_l0_omp,
integer, intent(in) l_virt_l0_omp,
integer, dimension( l_virt_l0_omp ), intent(in) virt_l0_omp,
integer, dimension( l_virt_l0_omp ), intent(in) virt_l0_omp_mapping,
integer, intent(in) l_phys_l0_omp,
integer, dimension( l_phys_l0_omp ), intent(in) phys_l0_omp,
integer, dimension( l_phys_l0_omp ), intent(in) perm_l0_omp,
integer, dimension( l_phys_l0_omp + 1), intent(in) ptr_leafs_l0_omp,
integer, dimension( ll0_omp_mapping ), intent(out) l0_omp_mapping,
integer, intent(in) ll0_omp_mapping,
integer(8), intent(in) thread_la,
type (mumps_tps_t), dimension(:) mumps_tps_arr,
type (dmumps_tps_t), dimension(:) dmumps_tps_arr,
integer nstepsw,
double precision opassw,
double precision opeliw,
integer nelvaw,
integer comp,
integer maxfrw,
integer nmaxnpivw,
integer npvw,
integer noffnegw,
integer nb22t1w,
integer nbtinyw,
integer det_expw,
double precision det_mantw,
integer det_signw,
integer, dimension(n) lrgroups,
type (dmumps_l0ompfac_t), dimension(ll0_omp_factors), intent(inout) l0_omp_factors,
integer, intent(in) ll0_omp_factors,
integer, dimension(nbstats_i4, nbcols_i4), intent(in) i4_l0_omp,
integer, intent(in) nbstats_i4,
integer, intent(in) nbcols_i4,
integer(8), dimension(nbstats_i8, nbcols_i8), intent(in) i8_l0_omp,
integer, intent(in) nbstats_i8,
integer, intent(in) nbcols_i8 )

Definition at line 22 of file dfac_omp_m.F.

42 USE dmumps_load
43!$ USE OMP_LIB
44 USE mumps_tps_m, ONLY : mumps_tps_t
45 USE dmumps_tps_m, ONLY : dmumps_tps_t
47 USE dmumps_struc_def, ONLY : dmumps_root_struc,
48 & dmumps_l0ompfac_t
49 USE dmumps_dynamic_memory_m, ONLY :
51 IMPLICIT NONE
52 include 'mpif.h'
53 include 'mumps_tags.h'
54 include 'mumps_headers.h'
55 TYPE (DMUMPS_ROOT_STRUC) :: root
56 INTEGER N,LIW, LPTRAR,
57 & NSTEPSW, INFO(80)
58 INTEGER SLAVEF, COMM_NODES, MYID_NODES
59 INTEGER, DIMENSION(0: SLAVEF - 1) :: MEM_DISTRIB
60 INTEGER KEEP(500), ICNTL(60)
61 INTEGER(8) KEEP8(150)
62 INTEGER(8), INTENT(IN) :: THREAD_LA
63 INTEGER PROCNODE_STEPS(KEEP(28))
64 INTEGER ITLOC(N+KEEP(253))
65 DOUBLE PRECISION :: RHS_MUMPS(KEEP(255))
66 INTEGER NSTK_STEPS(KEEP(28))
67 INTEGER(8), INTENT(IN) :: PTRARW(LPTRAR), PTRAIW(LPTRAR)
68 INTEGER ND(KEEP(28))
69 INTEGER FILS(N),PTRIST(KEEP(28))
70 INTEGER STEP(N), FRERE(KEEP(28)), DAD(KEEP(28))
71 INTEGER PIMASTER(KEEP(28))
72 INTEGER PTLUST_S(KEEP(28)), PERM(N)
73 INTEGER ISTEP_TO_INIV2(KEEP(71)),
74 & TAB_POS_IN_PERE(SLAVEF+2,max(1,KEEP(56)))
75 INTEGER NE(KEEP(28))
76 DOUBLE PRECISION RINFO(40)
77 INTEGER(8) :: PAMASTER(KEEP(28)), PTRAST(KEEP(28))
78 INTEGER(8) :: PTRFAC(KEEP(28))
79 INTEGER NBROOT
80 INTEGER NBRTOT
81 INTEGER, intent(out) :: NBROOT_UNDER_L0
82 INTEGER COMM_LOAD, ASS_IRECV
83 DOUBLE PRECISION UU, SEUIL, SEUIL_LDLT_NIV2
84 INTEGER NELT
85 INTEGER FRTPTR( N+1 ), FRTELT( NELT )
86 INTEGER LBUFR, LBUFR_BYTES
87 INTEGER BUFR( LBUFR )
88 DOUBLE PRECISION DBLARR( KEEP8(26) )
89 INTEGER INTARR( KEEP8(27) )
90 INTEGER LPN_LIST
91 INTEGER PIVNUL_LIST(LPN_LIST)
92 DOUBLE PRECISION DKEEP(230)
93 DOUBLE PRECISION :: OPASSW, OPELIW
94 INTEGER LRGROUPS(N)
95 INTEGER, INTENT ( IN ) :: LPOOL_B_L0_OMP
96 INTEGER, INTENT ( IN ) :: IPOOL_B_L0_OMP
97 & ( LPOOL_B_L0_OMP )
98 INTEGER, INTENT ( IN ) :: L_PHYS_L0_OMP
99 INTEGER, INTENT ( IN ) :: PHYS_L0_OMP( L_PHYS_L0_OMP )
100 INTEGER, INTENT ( IN ) :: L_VIRT_L0_OMP
101 INTEGER, INTENT ( IN ) :: VIRT_L0_OMP( L_VIRT_L0_OMP )
102 INTEGER, INTENT ( IN ) :: VIRT_L0_OMP_MAPPING( L_VIRT_L0_OMP )
103 INTEGER, INTENT ( IN ) :: PERM_L0_OMP( L_PHYS_L0_OMP )
104 INTEGER, INTENT ( IN ) :: PTR_LEAFS_L0_OMP( L_PHYS_L0_OMP + 1)
105 INTEGER, INTENT ( IN ) :: LL0_OMP_MAPPING
106 INTEGER, INTENT ( OUT ) :: L0_OMP_MAPPING( LL0_OMP_MAPPING )
107 TYPE (MUMPS_TPS_T), DIMENSION(:) :: MUMPS_TPS_ARR
108 TYPE (DMUMPS_TPS_T), DIMENSION(:) :: DMUMPS_TPS_ARR
109 INTEGER, INTENT ( IN ) :: LL0_OMP_FACTORS
110 TYPE (DMUMPS_L0OMPFAC_T), INTENT(INOUT) ::
111 & L0_OMP_FACTORS(LL0_OMP_FACTORS)
112 INTEGER, INTENT (IN) :: NBSTATS_I4, NBSTATS_I8
113 INTEGER, INTENT (IN) :: NBCOLS_I4, NBCOLS_I8
114 INTEGER, INTENT (IN) :: I4_L0_OMP(NBSTATS_I4, NBCOLS_I4)
115 INTEGER(8), INTENT (IN) :: I8_L0_OMP(NBSTATS_I8, NBCOLS_I8)
117 INTEGER MUMPS_TYPENODE, MUMPS_PROCNODE
118 LOGICAL MUMPS_INSSARBR,MUMPS_ROOTSSARBR
120 LOGICAL DMUMPS_POOL_EMPTY
122 INTEGER numroc
123 EXTERNAL numroc
124 INTEGER :: MYTHREAD_ID, ITH
125 INTEGER :: THREAD_ID_P
126 DOUBLE PRECISION, PARAMETER :: DZERO = 0.0d0, done = 1.0d0
127 INTEGER INODE, LEAF
128 INTEGER TYPEF
129 INTEGER NBFIN
130 INTEGER TYPE
131 LOGICAL AVOID_DELAYED
132 INTEGER NBROOT_PROCESSED
133 INTEGER MAXFRW, NPVW, NMAXNPIVW, NOFFNEGW, NELVAW, COMP
134 INTEGER :: NB22T1W, NBTINYW, DET_EXPW, DET_SIGNW
135 DOUBLE PRECISION :: DET_MANTW
136 DOUBLE PRECISION FLOP_ESTIM_ACC
137#if defined(PANEL)
138 INTEGER(8) :: LAFAC
139 INTEGER LIWFAC, STRAT, TYPEFile, NextPiv2beWritten
140 INTEGER(8) :: ITMP8
141#endif
142 INTEGER :: LPOOL_P
143 INTEGER, DIMENSION(:), ALLOCATABLE :: IPOOL_P
144 INTEGER(8) :: TO_ALLOCATE
145 INTEGER, DIMENSION(:), ALLOCATABLE :: ID
146 INTEGER(8), DIMENSION(:), ALLOCATABLE :: VAL
147 INTEGER(8), ALLOCATABLE, DIMENSION(:) :: STATE, SIZE_COPIED
148 INTEGER :: NbWaitMem, NbFinished, NbOnGoingCopies, NbUnderL0
149 INTEGER(8) :: KEEP8_77_SAVE
150 DOUBLE PRECISION :: GTIME
151 INTEGER(8) :: MEMDISPO_UNDERL0, MEMDISPO_PERTHREAD
152 INTEGER :: BLR_STRAT
153 INTEGER :: VIRTUAL_TASK, PHYSICAL_TASK
154 INTEGER :: IFATH
155 INTEGER :: I, INFO_P(2), allocok
156 INTEGER(8) :: I8
157!$ INTEGER(8) :: CHUNK8
158!$ LOGICAL :: OMP_FLAG
159!$ INTEGER :: NOMP_SAVE
160 CALL mumps_load_disable()
161 gtime = mpi_wtime()
162 l0_omp_mapping = 0
163 nbroot_processed = 0
164 nstepsw = 0
165 opassw = dzero
166 opeliw = dzero
167 nelvaw = 0
168 comp = 0
169 maxfrw = 0
170 nmaxnpivw = 0
171 noffnegw = 0
172 flop_estim_acc = dzero
173 npvw = 0
174 nb22t1w = 0
175 nbtinyw = 0
176 det_expw = 0
177 det_mantw = cmplx(1.0d0,0.0d0, kind=kind(1.0d0))
178 det_signw = 1
179 DO ith = 1, keep(400)
180 NULLIFY(mumps_tps_arr(ith)%IW)
181 NULLIFY(mumps_tps_arr(ith)%ITLOC)
182 NULLIFY(dmumps_tps_arr(ith)%A)
183 CALL dmumps_set_maxs_maxis_thread(
184 & mumps_tps_arr(ith)%LA,
185 & mumps_tps_arr(ith)%LIW, blr_strat,
186 & keep,
187 & i4_l0_omp(1,ith), nbstats_i4,
188 & i8_l0_omp(1,ith), nbstats_i8)
189 ENDDO
190 IF (keep8(4) .NE. 0_8) THEN
191 CALL dmumps_ma_eff_mem_dispo (
192 & mumps_tps_arr, keep(400),keep8, keep,
193 & n, blr_strat, lpool_b_l0_omp,
194 & i8_l0_omp, nbstats_i8,
195 & memdispo_underl0
196 & )
197 memdispo_underl0 = max(memdispo_underl0/2_8,0_8)
198 keep8(77) = keep8(77) + memdispo_underl0
199 memdispo_perthread = 0_8
200 IF (memdispo_underl0.GT.0) THEN
201 memdispo_perthread = memdispo_underl0/(int(keep(400),8))
202 ENDIF
203 DO ith = 1, keep(400)
204 mumps_tps_arr(ith)%LA = mumps_tps_arr(ith)%LA +
205 & memdispo_perthread
206 ENDDO
207 ENDIF
208 DO ith = 1, keep(400)
209 mumps_tps_arr(ith)%LRLU = mumps_tps_arr(ith)%LA
210 mumps_tps_arr(ith)%LRLUS = mumps_tps_arr(ith)%LA
211 mumps_tps_arr(ith)%LRLUSM = mumps_tps_arr(ith)%LA
212 mumps_tps_arr(ith)%IPTRLU = mumps_tps_arr(ith)%LA
213 mumps_tps_arr(ith)%POSFAC = 1_8
214 mumps_tps_arr(ith)%IWPOS = 1
215 mumps_tps_arr(ith)%IWPOSCB = mumps_tps_arr(ith)%LIW
216 ENDDO
217 IF (keep(406) .EQ. 2 ) THEN
218 ALLOCATE(state(keep(400)), size_copied(keep(400)), stat=allocok)
219 IF (allocok .GT. 0 ) THEN
220 WRITE(*,*) "Problem allocating STATE/SIZE_COPIED", keep(400)
221 CALL mumps_abort()
222 ENDIF
223 CALL dmumps_perform_copies_init( state, keep8_77_save,
224 & nbwaitmem, nbfinished, nbongoingcopies, nbunderl0,
225 & keep, keep8 )
226 ENDIF
227!$OMP PARALLEL
228!$OMP& SHARED ( IPOOL_B_L0_OMP, LPOOL_B_L0_OMP )
229!$OMP& PRIVATE ( VIRTUAL_TASK, PHYSICAL_TASK,
230!$OMP& IPOOL_P, LPOOL_P, LEAF, INODE, IFATH, INFO_P, I, I8,
231!$OMP& TO_ALLOCATE, THREAD_ID_P,
232!$OMP& TYPE, TYPEF, AVOID_DELAYED, NOMP_SAVE, allocok )
233!$OMP& REDUCTION ( + : NPVW, OPASSW, OPELIW, NOFFNEGW, NELVAW, COMP,
234!$OMP& NB22T1W, NBTINYW, DET_EXPW,
235!$OMP& FLOP_ESTIM_ACC, NBROOT_PROCESSED, NSTEPSW )
236!$OMP& REDUCTION ( * : DET_MANTW, DET_SIGNW )
237!$OMP& REDUCTION ( max : MAXFRW, NMAXNPIVW )
238 thread_id_p = 1
239!$ THREAD_ID_P = OMP_GET_THREAD_NUM () + 1
240!$OMP BARRIER
241!$ NOMP_SAVE = omp_get_max_threads()
242!$ CALL omp_set_num_threads(1)
243 lpool_p = lpool_b_l0_omp
244 leaf = 1
245 info_p = 0
246 avoid_delayed = .false.
247 virtual_task = 0
248!$ IF ( omp_get_num_threads() .NE. KEEP(400) ) THEN
249!$ INFO_P(1)=-58
250!$ INFO_P(2)=-100-omp_get_num_threads()
251!$ GOTO 700
252!$ ENDIF
253 CALL dmumps_dm_fac_alloc_allowed( mumps_tps_arr(thread_id_p)%LA,
254 & keep8,
255 & info_p(1), info_p(2) )
256 IF (info_p(1) .LT. 0) GOTO 700
257 ALLOCATE ( dmumps_tps_arr(thread_id_p)%A(
258 & max(1_8,mumps_tps_arr(thread_id_p)%LA) ),
259 & stat=allocok)
260 IF (allocok.GT.0) THEN
261 info_p(1) = -13
262 CALL mumps_seti8toi4( mumps_tps_arr(thread_id_p)%LA,
263 & info_p(2))
264 GOTO 700
265 ELSE
267 & mumps_tps_arr(thread_id_p)%LA,
268 & keep(405).EQ.1,
269 & keep8, info_p(1), info_p(2),
270 & .false., .false. )
271 IF (info_p(1) .LT. 0) THEN
272 GOTO 700
273 ENDIF
274 ENDIF
275 to_allocate =
276 & ((int(mumps_tps_arr(thread_id_p)%LIW,8) * int(keep(34),8 )) /
277 & int(keep(35),8 ))+
278 & ((int(lpool_p,8) * int(keep(34),8 )) / int(keep(35),8 ))+
279 & ((int(n+keep(253),8) * int(keep(34),8 )) / int(keep(35),8 ))
280 CALL dmumps_dm_fac_alloc_allowed( to_allocate,
281 & keep8, info_p(1), info_p(2) )
282 IF ( info_p(1) .LT. 0 ) GOTO 700
283 ALLOCATE ( mumps_tps_arr(thread_id_p)%IW(
284 & mumps_tps_arr(thread_id_p)%LIW ),
285 & ipool_p( lpool_p ),
286 & mumps_tps_arr(thread_id_p)%ITLOC ( n + keep(253) ),
287 & stat = allocok )
288 IF ( allocok .GT. 0 ) THEN
289 info_p(1) = -13
290 info_p(2) = mumps_tps_arr(thread_id_p)%LIW +
291 & lpool_p + n+keep(253)
292 GOTO 700
293 ELSE
294 CALL mumps_dm_fac_upd_dyn_memcnts( to_allocate,
295 & keep(405).EQ.1, keep8,
296 & info_p(1), info_p(2), .true., .false. )
297 IF (info_p(1) .LT. 0) THEN
298 GOTO 700
299 ENDIF
300 ENDIF
301 CALL dmumps_alloc_cb( .false., 0_8,
302 & .false., .false., myid_nodes, n, keep, keep8, dkeep,
303 & mumps_tps_arr(thread_id_p)%IW(1),
304 & mumps_tps_arr(thread_id_p)%LIW,
305 & dmumps_tps_arr(thread_id_p)%A(1),
306 & mumps_tps_arr(thread_id_p)%LA,
307 & mumps_tps_arr(thread_id_p)%LRLU,
308 & mumps_tps_arr(thread_id_p)%IPTRLU,
309 & mumps_tps_arr(thread_id_p)%IWPOS,
310 & mumps_tps_arr(thread_id_p)%IWPOSCB,
311 & slavef, procnode_steps, dad,
312 & ptrist, ptrast, step, pimaster,
313 & pamaster, keep(ixsz), 0_8, -444, -444, .true.,
314 & comp, mumps_tps_arr(thread_id_p)%LRLUS,
315 & mumps_tps_arr(thread_id_p)%LRLUSM,
316 & info_p(1), info_p(2)
317 & )
318 CALL dmumps_init_pool_last3( ipool_p(1), lpool_p,
319 & leaf )
320 mumps_tps_arr(thread_id_p)%ITLOC = 0
321600 CONTINUE
322 virtual_task = virtual_task + 1
323 IF ( virtual_task .LT. l_virt_l0_omp ) THEN
324 IF ( virt_l0_omp_mapping( virtual_task ) .EQ. thread_id_p ) THEN
325 DO physical_task =
326 & virt_l0_omp( virtual_task ),
327 & virt_l0_omp( virtual_task + 1 ) - 1
328 DO i = ptr_leafs_l0_omp( perm_l0_omp( physical_task )+1 ) + 1,
329 & ptr_leafs_l0_omp( perm_l0_omp( physical_task ) )
330 IF (ipool_b_l0_omp(i) .GT. 0) THEN
331 CALL dmumps_insert_pool_n( n, ipool_p(1),
332 & lpool_p,
333 & procnode_steps, slavef, keep(199), keep(28), 3, 0, 1, step,
334 & ipool_b_l0_omp(i) )
335 END IF
336 END DO
337 DO WHILE (
338 & .NOT. dmumps_pool_empty( ipool_p(1), lpool_p )
339 & .AND. info_p(1) .GE. 0 )
340 CALL dmumps_extract_pool( n, ipool_p(1), lpool_p,
341 & procnode_steps, slavef, step, inode, keep, keep8, myid_nodes,
342 & nd, .false. )
343 10 CONTINUE
344 l0_omp_mapping( step( inode ) ) = thread_id_p
345 ifath = dad( step( inode ) )
346 TYPE = 1
347 IF ( ifath .NE. 0 ) THEN
348 typef = 1
349 ELSE
350 typef = -9999
351 ENDIF
352 CALL dmumps_process_front_niv1( comm_load, ass_irecv, n,
353 & inode, TYPE, TYPEF, MUMPS_TPS_ARR(THREAD_ID_P)%LA, MUMPS_TPS_ARR
354 & (THREAD_ID_P)%IW(1), MUMPS_TPS_ARR(THREAD_ID_P)%LIW,
355 & DMUMPS_TPS_ARR(THREAD_ID_P)%A(1), MAXFRW, NOFFNEGW, NPVW,
356 & NB22T1W, NBTINYW, DET_EXPW, DET_MANTW, DET_SIGNW, INFO_P, UU,
357 & SEUIL, SEUIL_LDLT_NIV2, OPELIW, NELVAW, NMAXNPIVW, NSTEPSW,
358 & PTRIST, PTLUST_S, PTRFAC, PTRAST, STEP, PIMASTER, PAMASTER,
359 & NE, MUMPS_TPS_ARR(THREAD_ID_P)%POSFAC,
360 & MUMPS_TPS_ARR(THREAD_ID_P)%LRLU,
361 & MUMPS_TPS_ARR(THREAD_ID_P)%LRLUS, MUMPS_TPS_ARR(THREAD_ID_P)%
362 % LRLUSM, MUMPS_TPS_ARR(THREAD_ID_P)%IPTRLU, ICNTL, KEEP, KEEP8,
363 & DKEEP, PIVNUL_LIST, LPN_LIST, COMP, MUMPS_TPS_ARR(THREAD_ID_P)%
364 & IWPOS, MUMPS_TPS_ARR(THREAD_ID_P)%IWPOSCB, PROCNODE_STEPS,
365 & SLAVEF, IFATH, COMM_NODES, MYID_NODES, IPOOL_P, LPOOL_P, LEAF,
366 & PERM, NSTK_STEPS, BUFR, LBUFR, LBUFR_BYTES,
367 & NBFIN, root, OPASSW, MUMPS_TPS_ARR(THREAD_ID_P)%ITLOC(1),
368 & RHS_MUMPS, FILS, PTRARW, PTRAIW, INTARR, DBLARR, ND, FRERE, DAD,
369 & LPTRAR, NELT, FRTPTR, FRTELT, ISTEP_TO_INIV2, TAB_POS_IN_PERE,
370 & LRGROUPS, FLOP_ESTIM_ACC )
371 IF (info_p(1) .LT. 0) THEN
372 GOTO 700
373 ENDIF
374 IF ( ifath .NE. 0 ) THEN
375 IF ( phys_l0_omp( perm_l0_omp( physical_task ) )
376 & .NE. inode ) THEN
377 nstk_steps( step( ifath ) ) =
378 & nstk_steps( step( ifath ) ) - 1
379 IF ( nstk_steps( step( ifath ) ) .EQ. 0 ) THEN
380 inode = ifath
381 GOTO 10
382 ENDIF
383 ELSE
384!$OMP ATOMIC UPDATE
385 nstk_steps( step( ifath ) ) =
386 & nstk_steps( step( ifath ) ) - 1
387!$OMP END ATOMIC
388 END IF
389 ELSE
390 nbroot_processed = nbroot_processed + 1
391 END IF
392 END DO
393 END DO
394 ENDIF
395 GOTO 600
396 ENDIF
397 700 CONTINUE
398 IF (associated(mumps_tps_arr(thread_id_p)%ITLOC)) THEN
399 DEALLOCATE(mumps_tps_arr(thread_id_p)%ITLOC)
400 NULLIFY(mumps_tps_arr(thread_id_p)%ITLOC)
402 & -(int(n+keep(253),8) * int(keep(34),8 )) / int(keep(35),8),
403 & keep(405).EQ.1, keep8,
404 & info_p(1), info_p(2), .true., .false. )
405 ENDIF
406 IF (allocated(ipool_p)) THEN
407 DEALLOCATE(ipool_p);
409 & -(int(lpool_p,8) * int(keep(34),8 )) / int(keep(35),8),
410 & keep(405).EQ.1, keep8,
411 & info_p(1), info_p(2), .true., .false. )
412 ENDIF
413 IF ( keep(406) .EQ. 2) THEN
414 CALL dmumps_perform_copies( thread_id_p,
415 & mumps_tps_arr, dmumps_tps_arr,
416 & l0_omp_factors, ll0_omp_factors,
417 & state, size_copied,
418 & nbwaitmem, nbfinished, nbongoingcopies, nbunderl0,
419 & myid_nodes, n, slavef,
420 & step, ptrast, pamaster, procnode_steps, dad,
421 & keep, keep8, info_p
422 & )
423 ELSE
424 IF ((keep(407) .EQ. 1) .OR. (keep(406) .EQ.1) ) THEN
425 IF (info_p(1) .GE. 0) THEN
427 & (2,
428 & 0_8,
429 & .false.,
430 & myid_nodes, n, slavef, keep, keep8,
431 & mumps_tps_arr(thread_id_p)%IW(1),
432 & mumps_tps_arr(thread_id_p)%LIW,
433 & mumps_tps_arr(thread_id_p)%IWPOSCB,
434 & mumps_tps_arr(thread_id_p)%IWPOS,
435 & dmumps_tps_arr(thread_id_p)%A(1),
436 & mumps_tps_arr(thread_id_p)%LA,
437 & mumps_tps_arr(thread_id_p)%LRLU,
438 & mumps_tps_arr(thread_id_p)%IPTRLU,
439 & mumps_tps_arr(thread_id_p)%LRLUS,
440 & step, ptrast, pamaster, procnode_steps, dad,
441 & info_p(1), info_p(2) )
442 ENDIF
443 ENDIF
444 IF (keep(406) .EQ.1) THEN
445 IF (info_p(1) .GE.0 )THEN
446 to_allocate = max(mumps_tps_arr(thread_id_p)%POSFAC-1,1_8)
447 CALL dmumps_dm_fac_alloc_allowed( to_allocate,
448 & keep8, info_p(1), info_p(2) )
449 ENDIF
450 IF (info_p(1) .GE.0 )THEN
451 ALLOCATE(l0_omp_factors(thread_id_p)%A(to_allocate),
452 & stat=allocok)
453 IF (allocok .GT. 0) THEN
454 info_p(1) = -13
455 CALL mumps_seti8toi4(to_allocate, info_p(2))
456 l0_omp_factors(thread_id_p)%LA = 0_8
457 ELSE
458 l0_omp_factors(thread_id_p)%LA =
459 & mumps_tps_arr(thread_id_p)%POSFAC-1_8
461 & l0_omp_factors(thread_id_p)%LA, keep(405).EQ.1, keep8,
462 & info_p(1), info_p(2), .true., .false. )
463 ENDIF
464 ENDIF
465 IF (info_p(1) .GE.0 ) THEN
466 DO i8 = 1_8, mumps_tps_arr(thread_id_p)%POSFAC-1_8
467 l0_omp_factors(thread_id_p)%A(i8) =
468 & dmumps_tps_arr(thread_id_p)%A(i8)
469 ENDDO
470 ENDIF
471 IF ( associated(dmumps_tps_arr(thread_id_p)%A)) THEN
472 DEALLOCATE(dmumps_tps_arr(thread_id_p)%A)
473 NULLIFY(dmumps_tps_arr(thread_id_p)%A)
475 & -mumps_tps_arr(thread_id_p)%LA,
476 & keep(405).EQ.1,
477 & keep8,
478 & info_p(1), info_p(2),
479 & .false., .false. )
480 IF (info_p(1) .GE. 0) THEN
481!$OMP ATOMIC UPDATE
482 keep8(69) = keep8(69) - l0_omp_factors(thread_id_p)%LA
483!$OMP END ATOMIC
484 ENDIF
485 ENDIF
486 ENDIF
487 ENDIF
488 IF (info_p(1) .LT.0) THEN
489!$OMP CRITICAL(critical_info)
490 info(1) = info_p(1)
491 info(2) = info_p(2)
492!$OMP END CRITICAL(critical_info)
493 ELSE IF (info_p(1) .GE. 0) THEN
494!$OMP CRITICAL(critical_info)
495 IF (info(1) .EQ. 0) THEN
496 info(1) = info_p(1)
497 info(2) = info_p(2)
498 ENDIF
499!$OMP END CRITICAL(critical_info)
500 ENDIF
501#if defined(WORKAROUNDINTELILP64OPENMPLIMITATION)
502!$ CALL omp_set_num_threads(int(NOMP_SAVE,4))
503#else
504!$ CALL omp_set_num_threads(NOMP_SAVE)
505#endif
506!$OMP END PARALLEL
507 IF (info(1) .LT. 0) THEN
508 IF (icntl(1) .GT. 0 .AND. icntl(4) .GE.1 ) THEN
509 WRITE(icntl(1),'(A,I6,I16,A,I5,A)')
510 & "** ERROR DURING L0_OMP: INFO(1:2)=",
511 & info(1), info(2), " (MPI worker ", myid_nodes,")"
512 ENDIF
513 ENDIF
514 IF ( keep(406) .EQ. 0 ) THEN
515 ALLOCATE(id(keep(400)), val(keep(400)),
516 & stat = allocok)
517 IF ( allocok .GT. 0 ) THEN
518 info(1) = -13
519 info(2) = keep(400)
520 GOTO 800
521 ENDIF
522 DO mythread_id = 1, keep(400)
523 val(mythread_id) = mumps_tps_arr( mythread_id )%POSFAC-1_8
524 id(mythread_id) = mythread_id
525 ENDDO
526 CALL mumps_sort_int8(keep(400), val, id)
527 DO ith=1, keep(400)
528 mythread_id = id(ith)
529 IF ((keep(407).NE.1) .AND. (keep(406).EQ.0)) THEN
530 IF (info(1) .GE. 0) THEN
532 & (2,
533 & 0_8,
534 & .false.,
535 & myid_nodes, n, slavef, keep, keep8,
536 & mumps_tps_arr(mythread_id)%IW(1),
537 & mumps_tps_arr(mythread_id)%LIW,
538 & mumps_tps_arr(mythread_id)%IWPOSCB,
539 & mumps_tps_arr(mythread_id)%IWPOS,
540 & dmumps_tps_arr(mythread_id)%A(1),
541 & mumps_tps_arr(mythread_id)%LA,
542 & mumps_tps_arr(mythread_id)%LRLU,
543 & mumps_tps_arr(mythread_id)%IPTRLU,
544 & mumps_tps_arr(mythread_id)%LRLUS,
545 & step, ptrast, pamaster, procnode_steps, dad,
546 & info(1), info(2) )
547 ENDIF
548 ENDIF
549 IF (keep(406).EQ.0) THEN
550 IF (info(1) .GE. 0 )THEN
551 to_allocate = max(mumps_tps_arr(mythread_id)%POSFAC-1,1_8)
552 CALL dmumps_dm_fac_alloc_allowed( to_allocate,
553 & keep8, info(1), info(2) )
554 ENDIF
555 IF (info(1) .GE.0 ) THEN
556 ALLOCATE(l0_omp_factors(mythread_id)%A(to_allocate),
557 & stat=allocok)
558 IF (allocok .GT. 0) THEN
559 info(1) = -13
560 CALL mumps_seti8toi4(to_allocate, info(2))
561 l0_omp_factors(mythread_id)%LA = 0_8
562 ELSE
563 l0_omp_factors(mythread_id)%LA =
564 & mumps_tps_arr(mythread_id)%POSFAC-1_8
566 & l0_omp_factors(mythread_id)%LA,
567 & keep(405).EQ.1, keep8,
568 & info(1), info(2), .true., .false. )
569 ENDIF
570 ENDIF
571 IF (info(1) .GE. 0) THEN
572!$ CHUNK8 = max( int(KEEP(361),8),
573!$ & (MUMPS_TPS_ARR(MYTHREAD_ID)%POSFAC+KEEP(400)-2_8) /
574!$ & KEEP(400) )
575!$ OMP_FLAG = ( (MUMPS_TPS_ARR(MYTHREAD_ID)%POSFAC-1_8 >
576!$ & int(KEEP(361),8))
577!$ & .AND. (KEEP(400).GT.1)
578!$ & )
579!$OMP PARALLEL DO PRIVATE(I8) SCHEDULE(STATIC, CHUNK8)
580!$OMP& IF (OMP_FLAG)
581 DO i8 = 1_8, mumps_tps_arr(mythread_id)%POSFAC-1_8
582 l0_omp_factors(mythread_id)%A(i8) =
583 & dmumps_tps_arr(mythread_id)%A(i8)
584 ENDDO
585!$OMP END PARALLEL DO
586 ENDIF
587 IF ( associated(dmumps_tps_arr(mythread_id)%A)) THEN
588 DEALLOCATE(dmumps_tps_arr(mythread_id)%A)
589 NULLIFY(dmumps_tps_arr(mythread_id)%A)
591 & -mumps_tps_arr(mythread_id)%LA,
592 & keep(405).EQ.1, keep8,
593 & info(1), info(2),
594 & .false., .false. )
595 IF (info(1).GE.0) THEN
596 keep8(69) = keep8(69) - l0_omp_factors(mythread_id)%LA
597 ENDIF
598 ENDIF
599 ENDIF
600 ENDDO
601 IF (ALLOCATED(id)) DEALLOCATE(id)
602 IF (ALLOCATED(val)) DEALLOCATE(val)
603 ENDIF
604 800 CONTINUE
605 keep8(64) = 0_8
606 DO i = 1, keep(400)
607 keep8(64) = keep8(64) + mumps_tps_arr(i)%POSFAC - 1_8
608 ENDDO
609 keep8(62) = 0_8
610 DO i = 1, keep(400)
611 keep8(62) = keep8(62) + mumps_tps_arr(i)%LRLUSM
612 ENDDO
613 nbroot_under_l0 = nbroot_processed
614 dkeep(95) = mpi_wtime() - gtime
615 time_update = time_update/dble(keep(400))
616 time_update_lrlr1 = time_update_lrlr1/dble(keep(400))
617 time_update_lrlr2 = time_update_lrlr2/dble(keep(400))
618 time_update_lrlr3 = time_update_lrlr3/dble(keep(400))
619 time_update_frlr = time_update_frlr/dble(keep(400))
620 time_update_frfr = time_update_frfr/dble(keep(400))
622 time_compress = time_compress/dble(keep(400))
624 time_cb_compress = time_cb_compress/dble(keep(400))
625 time_panel = time_panel/dble(keep(400))
626 time_fac_i = time_fac_i/dble(keep(400))
627 time_fac_mq = time_fac_mq/dble(keep(400))
628 time_fac_sq = time_fac_sq/dble(keep(400))
629 time_frfronts = time_frfronts/dble(keep(400))
630 time_lrtrsm = time_lrtrsm/dble(keep(400))
631 time_frtrsm = time_frtrsm/dble(keep(400))
632 time_lr_module = time_lr_module/dble(keep(400))
633 time_decomp = time_decomp/dble(keep(400))
634 time_diagcopy = time_diagcopy/dble(keep(400))
635 time_decomp_ucfs = time_decomp_ucfs/dble(keep(400))
636 time_decomp_asm1 = time_decomp_asm1/dble(keep(400))
639 time_decomp_asms2s = time_decomp_asms2s/dble(keep(400))
640 time_decomp_asms2m = time_decomp_asms2m/dble(keep(400))
641 CALL mumps_load_enable()
642 CALL dmumps_load_update(0,.false., flop_estim_acc,keep,keep8)
643 RETURN
float cmplx[2]
Definition pblas.h:136
#define mumps_abort
Definition VE_Metis.h:25
subroutine dmumps_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 dmumps_dm_cbstatic2dynamic_i(strategy, sizer_needed, skip_top_stack, myid, n, slavef, keep, keep8, iw, liw, iwposcb, iwpos, a, la, lrlu, iptrlu, lrlus, step, ptrast, pamaster, procnode_steps, dad, iflag, ierror)
recursive subroutine dmumps_process_front_niv1(comm_load, ass_irecv, n, inode, type, typef, la, iw, liw, a, maxfrw, noffnegw, npvw, nb22t1w, nbtinyw, det_expw, det_mantw, det_signw, info_p, uu, seuil, seuil_ldlt_niv2, opeliw, nelvaw, nmaxnpivw, nstepsw, ptrist, ptlust_s, ptrfac, ptrast, step, pimaster, pamaster, ne, posfac, lrlu, lrlus, lrlusm, iptrlu, icntl, keep, keep8, dkeep, pivnul_list, lpn_list, comp, iwpos, iwposcb, procnode_steps, slavef, ifath, comm_nodes, myid_nodes, ipool_p, lpool_p, leaf, perm, nstk_steps, bufr, lbufr, lbufr_bytes, nbfin, root, opassw, itloc, rhs_mumps, fils, ptrarw, ptraiw, intarr, dblarr, nd, frere, dad, lptrar, nelt, frtptr, frtelt, istep_to_iniv2, tab_pos_in_pere, lrgroups, flop_estim_acc)
logical function dmumps_pool_empty(pool, lpool)
subroutine dmumps_init_pool_last3(ipool, lpool, leaf)
subroutine dmumps_insert_pool_n(n, pool, lpool, procnode, slavef, keep199, k28, k76, k80, k47, step, inode)
subroutine dmumps_extract_pool(n, pool, lpool, procnode, slavef, step, inode, keep, keep8, myid, nd, force_extract_top_sbtr)
#define max(a, b)
Definition macros.h:21
double precision function mpi_wtime()
Definition mpi.f:561
integer function numroc(n, nb, iproc, isrcproc, nprocs)
Definition mpi.f:786
initmumps id
subroutine dmumps_dm_fac_alloc_allowed(mem_count_to_allocate, keep8, iflag, ierror)
subroutine, public mumps_load_enable()
subroutine, public mumps_load_disable()
subroutine, public dmumps_load_update(check_flops, process_bande, inc_load, keep, keep8)
double precision time_cb_compress
Definition dlr_stats.F:58
double precision time_frtrsm
Definition dlr_stats.F:62
double precision time_update_frlr
Definition dlr_stats.F:53
double precision time_frswap_compress
Definition dlr_stats.F:57
double precision time_decomp_asms2s
Definition dlr_stats.F:74
double precision time_decomp
Definition dlr_stats.F:69
double precision time_lr_module
Definition dlr_stats.F:59
double precision time_decomp_asms2m
Definition dlr_stats.F:75
double precision time_fac_sq
Definition dlr_stats.F:66
double precision time_panel
Definition dlr_stats.F:63
double precision time_decomp_maplig1
Definition dlr_stats.F:73
double precision time_compress
Definition dlr_stats.F:55
double precision time_lrtrsm
Definition dlr_stats.F:61
double precision time_midblk_compress
Definition dlr_stats.F:56
double precision time_frfronts
Definition dlr_stats.F:67
double precision time_update_lrlr3
Definition dlr_stats.F:52
double precision time_fac_i
Definition dlr_stats.F:64
double precision time_update_lrlr2
Definition dlr_stats.F:51
double precision time_update_frfr
Definition dlr_stats.F:54
double precision time_decomp_locasm2
Definition dlr_stats.F:72
double precision time_update
Definition dlr_stats.F:49
double precision time_diagcopy
Definition dlr_stats.F:68
double precision time_decomp_ucfs
Definition dlr_stats.F:70
double precision time_fac_mq
Definition dlr_stats.F:65
double precision time_update_lrlr1
Definition dlr_stats.F:50
double precision time_decomp_asm1
Definition dlr_stats.F:71
int comp(int a, int b)
subroutine mumps_seti8toi4(i8, i)
logical function mumps_rootssarbr(procinfo_inode, k199)
subroutine mumps_sort_int8(n, val, id)
logical function mumps_inssarbr(procinfo_inode, k199)
integer function mumps_typenode(procinfo_inode, k199)
integer function mumps_procnode(procinfo_inode, k199)
subroutine mumps_dm_fac_upd_dyn_memcnts(mem_count_allocated, atomic_updates, keep8, iflag, ierror, k69upd, k71upd)

◆ dmumps_l0omp_copy_iw()

subroutine dmumps_fac_omp_m::dmumps_l0omp_copy_iw ( integer, dimension(:), intent(inout) iw,
integer, intent(in) liw,
integer, intent(inout) iwpos,
type (mumps_tps_t), dimension(:), target mumps_tps_arr,
integer, dimension(500) keep,
integer, dimension(keep(28)), intent(inout) ptlust,
integer, dimension(60), intent(in) icntl,
integer, dimension(80), intent(inout) info )

Definition at line 767 of file dfac_omp_m.F.

770 USE mumps_tps_m, ONLY : mumps_tps_t
771 IMPLICIT NONE
772 INTEGER :: KEEP(500)
773 INTEGER, INTENT( IN ) :: LIW
774 INTEGER, INTENT( INOUT ) :: IW(:)
775 INTEGER, INTENT( INOUT ) :: IWPOS
776 INTEGER, INTENT( INOUT ) :: PTLUST(KEEP(28))
777 INTEGER, INTENT( IN ) :: ICNTL(60)
778 INTEGER, INTENT( INOUT ) :: INFO(80)
779 TYPE (MUMPS_TPS_T), TARGET :: MUMPS_TPS_ARR(:)
780 INTEGER :: ITHREAD, JTHREAD
781 INTEGER :: REQUESTED_SIZE
782 INTEGER :: IWPOS_TO_COPY
783 INTEGER :: LOC_IPOS
784 INTEGER :: LOC_SIZE, LOC_ISTEP
785 TYPE (MUMPS_TPS_T), POINTER :: MUMPS_TPS
786 include 'mumps_headers.h'
787 requested_size = 0
788 DO ithread = 1, size(mumps_tps_arr)
789 mumps_tps => mumps_tps_arr(ithread)
790 requested_size = requested_size + mumps_tps%IWPOS - 1
791 ENDDO
792 IF ( liw - iwpos + 1 .LT. requested_size ) THEN
793 WRITE(*,*) " LIW too small in DMUMPS_L0OMP_COPY_IW !!", liw,
794 & requested_size
795 info(1) = -8
796 info(2) = requested_size-liw+iwpos-1
797 IF ( icntl(1) .GT. 0 .AND. icntl(4).GE.1) THEN
798 WRITE(icntl(1),*) " ** ERROR IN DMUMPS_L0OMP_COPY_IW: ",
799 & "LIW TOO SMALL TO COPY LOCAL FACTOR INFORMATION",
800 & info(2)
801 ENDIF
802 GOTO 500
803 ENDIF
804 DO ithread = 1, size(mumps_tps_arr)
805 mumps_tps => mumps_tps_arr(ithread)
806 iwpos_to_copy = iwpos
807 DO jthread=1, ithread - 1
808 iwpos_to_copy = iwpos_to_copy+mumps_tps_arr(jthread)%IWPOS-1
809 ENDDO
810 iw(iwpos_to_copy: iwpos_to_copy+mumps_tps%IWPOS - 2) =
811 & mumps_tps%IW(1:mumps_tps%IWPOS-1)
812 loc_ipos = 1
813 DO WHILE ( loc_ipos .NE. mumps_tps%IWPOS )
814 loc_size = mumps_tps%IW(loc_ipos+xxi)
815 loc_istep = mumps_tps%IW(loc_ipos+keep(ixsz)+4)
816 ptlust(loc_istep) = iwpos_to_copy+loc_ipos-1
817 loc_ipos = loc_ipos + loc_size
818 ENDDO
819 ENDDO
820 iwpos = iwpos + requested_size
821 500 CONTINUE
822 RETURN

◆ dmumps_ma_eff_mem_dispo()

subroutine dmumps_fac_omp_m::dmumps_ma_eff_mem_dispo ( type (mumps_tps_t), dimension(:), intent(in) mumps_tps_arr,
integer, intent(in) nbthreads,
integer(8), dimension(150), intent(in) keep8,
integer, dimension(500), intent(in) keep,
integer, intent(in) n,
integer, intent(in) blr_strat,
integer, intent(in) lpool_p,
integer(8), dimension(nbstats_i8,nbthreads), intent(in) i8_l0_omp,
integer, intent(in) nbstats_i8,
integer(8), intent(out) memdispo_underl0 )

Definition at line 680 of file dfac_omp_m.F.

685 USE mumps_tps_m, ONLY : mumps_tps_t
686 IMPLICIT NONE
687 INTEGER, INTENT(IN) :: N, BLR_STRAT, KEEP(500)
688 INTEGER, INTENT(IN) :: NBSTATS_I8, NBTHREADS, LPOOL_P
689 INTEGER(8), INTENT(IN) :: KEEP8(150)
690 INTEGER(8), INTENT(IN) :: I8_L0_OMP(NBSTATS_I8,NBTHREADS)
691 INTEGER(8), INTENT(OUT) :: MEMDISPO_UNDERL0
692 TYPE (MUMPS_TPS_T), INTENT(IN) :: MUMPS_TPS_ARR(:)
693 INTEGER :: PERLU, ITH, ITHMIN, ITHMIN_if_LRLU, OOC_STRAT
694 INTEGER(8) :: TO_ALLOCATE, BLR_RELATED, COPY_RELATED
695 INTEGER(8) :: MIN_NRLADU_underL0, MIN_NRLADU_if_LR_LU_underL0
696 perlu = keep(12)
697 ooc_strat = keep(201)
698 to_allocate = 0_8
699 DO ith = 1, nbthreads
700 to_allocate = to_allocate +
701 & ((int(mumps_tps_arr(ith)%LIW,8) * int(keep(34),8 )) /
702 & int(keep(35),8 ))
703 & + mumps_tps_arr(ith)%LA
704 ENDDO
705 to_allocate = to_allocate + int(nbthreads,8)* (
706 & ((int(lpool_p,8) * int(keep(34),8 )) / int(keep(35),8 )) +
707 & ((int(n+keep(253),8) * int(keep(34),8 )) / int(keep(35),8 ))
708 & )
709 blr_related = 0_8
710 DO ith = 1, nbthreads
711 IF (blr_strat.EQ.1) THEN
712 blr_related = blr_related +
713 & i8_l0_omp(10,ith) +
714 & int(perlu,8) * ( i8_l0_omp(10,ith) / 100_8 + 1_8)
715 ELSE IF (blr_strat.EQ.2) THEN
716 blr_related = blr_related +
717 & i8_l0_omp(13,ith) +
718 & int(perlu,8) * ( i8_l0_omp(13,ith) / 100_8 + 1_8)
719 ELSE IF (blr_strat.EQ.3) THEN
720 blr_related = blr_related +
721 & i8_l0_omp(8,ith) +
722 & int(perlu,8) * ( i8_l0_omp(8,ith) / 100_8 + 1_8)
723 ENDIF
724 ENDDO
725 copy_related = 0_8
726 ithmin = 1
727 ithmin_if_lrlu = 1
728 min_nrladu_if_lr_lu_underl0 = i8_l0_omp(4,1)
729 min_nrladu_underl0 = i8_l0_omp(1,1)
730 DO ith = 1, nbthreads
731 IF (i8_l0_omp(1,ith).LT.min_nrladu_underl0)
732 & THEN
733 min_nrladu_underl0 = i8_l0_omp(1,ith)
734 ithmin = ith
735 ENDIF
736 IF (i8_l0_omp(4,ith).LT.min_nrladu_if_lr_lu_underl0)
737 & THEN
738 min_nrladu_if_lr_lu_underl0 = i8_l0_omp(4,ith)
739 ithmin_if_lrlu = ith
740 ENDIF
741 ENDDO
742 IF (blr_strat.EQ.0) THEN
743 IF (ooc_strat .LE. 0 .AND. ooc_strat .NE. -1 ) THEN
744 copy_related = copy_related +
745 & i8_l0_omp(1,ithmin) +
746 & i8_l0_omp(23, ithmin)
747 ELSE
748 copy_related = copy_related +
749 & i8_l0_omp(23, ithmin)
750 ENDIF
751 ELSE
752 IF (ooc_strat .LE. 0 .AND. ooc_strat .NE. -1 ) THEN
753 copy_related = copy_related +
754 & i8_l0_omp(4,ithmin_if_lrlu) +
755 & i8_l0_omp(23,ithmin_if_lrlu )
756 ELSE
757 copy_related = copy_related +
758 & i8_l0_omp(23, ithmin_if_lrlu)
759 ENDIF
760 ENDIF
761 copy_related = copy_related +
762 & int(perlu,8)*(copy_related / 100_8 + 1_8 )
763 to_allocate = to_allocate + copy_related + blr_related
764 memdispo_underl0 = keep8(75) - to_allocate
765 RETURN

◆ dmumps_perform_copies()

subroutine dmumps_fac_omp_m::dmumps_perform_copies ( integer, intent(in) thread_id_p,
type (mumps_tps_t), dimension(:) mumps_tps_arr,
type (dmumps_tps_t), dimension(:) dmumps_tps_arr,
type (dmumps_l0ompfac_t), dimension(ll0_omp_factors), intent(inout) l0_omp_factors,
integer, intent(in) ll0_omp_factors,
integer(8), dimension( keep(400) ), intent(inout) state,
integer(8), dimension(keep(400) ), intent(inout) size_copied,
integer, intent(inout) nbwaitmem,
integer, intent(inout) nbfinished,
integer, intent(inout) nbongoingcopies,
integer, intent(inout) nbunderl0,
integer, intent(in) myid_nodes,
integer, intent(in) n,
integer, intent(in) slavef,
integer, dimension(n), intent(in) step,
integer(8), dimension(keep(28)), intent(in) ptrast,
integer(8), dimension(keep(28)), intent(in) pamaster,
integer, dimension(keep(28)), intent(in) procnode_steps,
integer, dimension(keep(28)), intent(in) dad,
integer, dimension(500) keep,
integer(8), dimension(150) keep8,
integer, dimension(2), intent(inout) info_p )

Definition at line 845 of file dfac_omp_m.F.

854 USE mumps_tps_m, ONLY : mumps_tps_t
855 USE dmumps_tps_m, ONLY : dmumps_tps_t
856 USE dmumps_struc_def, ONLY : dmumps_l0ompfac_t
857 INTEGER :: KEEP(500)
858 INTEGER(8) :: KEEP8(150)
859 INTEGER, INTENT(IN) :: THREAD_ID_P
860 INTEGER, INTENT(INOUT) :: INFO_P(2)
861 INTEGER, INTENT(IN) :: MYID_NODES, N, SLAVEF
862 INTEGER, INTENT(IN) :: STEP(N), DAD(KEEP(28))
863 INTEGER(8), INTENT(IN) :: PAMASTER(KEEP(28)), PTRAST(KEEP(28))
864 INTEGER, INTENT(IN) :: PROCNODE_STEPS(KEEP(28))
865 INTEGER, INTENT(INOUT) :: NbWaitMem,
866 & NbFinished,
867 & NbOnGoingCopies,
868 & NbUnderL0
869 INTEGER(8), INTENT(INOUT) :: STATE( KEEP(400) )
870 INTEGER(8), INTENT(INOUT) :: SIZE_COPIED(KEEP(400) )
871 TYPE (MUMPS_TPS_T), DIMENSION(:) :: MUMPS_TPS_ARR
872 TYPE (DMUMPS_TPS_T), DIMENSION(:) :: DMUMPS_TPS_ARR
873 INTEGER, INTENT ( IN ) :: LL0_OMP_FACTORS
874 TYPE (DMUMPS_L0OMPFAC_T), INTENT(INOUT) ::
875 & L0_OMP_FACTORS(LL0_OMP_FACTORS)
876 INTEGER :: LOCAL_ACTION
877 INTEGER, PARAMETER :: NOTHING = 0
878 INTEGER, PARAMETER :: FREE_WORK_MYID = 1
879 INTEGER, PARAMETER :: COPY_FACTORS = 2
880 INTEGER, PARAMETER :: AllocateViderCB = 3
881 INTEGER, PARAMETER :: DORMIR = 4
882 INTEGER(8) :: COPY_START, CHUNK8, I8, TO_ALLOCATE
883 INTEGER :: ITH, K
884 INTEGER :: allocok
885 INTEGER(8) :: PeakAuthorized_P
886 INTEGER(8) :: MemNeeded_P, MemNeededForCB_P, MemDispo_P,
887 & CBCopiedToDynamic_P, LRLUS_SAVE_P
888 INTEGER(8) :: KEEP8_71, KEEP8_73
889!$OMP CRITICAL(L0_COPIES)
890 state(thread_id_p) = copynotstarted
891 IF ( info_p(1) .LT. 0 ) THEN
892 nbfinished = nbfinished + 1
893 state(thread_id_p) = finished
894 ENDIF
895 DO ith = 1, keep(400)
896 IF ( state(ith) .EQ. waitmem ) THEN
897 state(ith)=copynotstarted
898 ENDIF
899 ENDDO
900 nbwaitmem = 0
901!$OMP END CRITICAL(L0_COPIES)
902 DO WHILE ( nbfinished .NE. keep(400) )
903 local_action = dormir
904!$OMP CRITICAL(L0_COPIES)
905 IF ( nbfinished.EQ. keep(400)) THEN
906 local_action = nothing
907 ELSE IF ( (nbfinished+nbwaitmem) .EQ. keep(400) ) THEN
908!$OMP ATOMIC READ
909 keep8_73 = keep8(73)
910!$OMP END ATOMIC
911!$OMP ATOMIC READ
912 keep8_71 = keep8(71)
913!$OMP END ATOMIC
914 memdispo_p = keep8(77) - (keep8_73 -keep8_71)
915 memdispo_p = min(memdispo_p, keep8(75)-keep8_73)
916 memneeded_p = huge(memneeded_p)
917 DO ith = 1, keep(400)
918 IF (state(ith).EQ.waitmem) THEN
919 memneeded_p = min( memneeded_p,
920 & mumps_tps_arr(ith)%LA -
921 & mumps_tps_arr(ith)%LRLUS )
922 ENDIF
923 ENDDO
924 IF ((keep8(75)-keep8_73).LT.memneeded_p) THEN
925 info_p(1) = -19
926 CALL mumps_set_ierror (
927 & memneeded_p-(keep8(75)-keep8_73), info_p(2))
928 DO ith = 1, keep(400)
929 state(ith) = finished
930 ENDDO
931 nbfinished = keep(400)
932 ELSE
933 keep8(77) = memneeded_p + (keep8_73 -keep8_71)
934 DO ith = 1, keep(400)
935 IF ( state(ith) .EQ. waitmem ) THEN
936 state(ith)=copynotstarted
937 ENDIF
938 ENDDO
939 nbwaitmem = 0
940 ENDIF
941 local_action = nothing
942 ELSE
943 SELECT CASE (state(thread_id_p))
944 CASE ( copyfactorsfinished )
945 local_action = free_work_myid
946 CASE ( copynotstarted )
947!$OMP ATOMIC READ
948 keep8_73 = keep8(73)
949!$OMP END ATOMIC
950!$OMP ATOMIC READ
951 keep8_71 = keep8(71)
952!$OMP END ATOMIC
953 peakauthorized_p = keep8(77)
954 memdispo_p = peakauthorized_p - (keep8_73 -keep8_71)
955 memdispo_p = min(memdispo_p, keep8(75)-keep8_73)
956 memneeded_p = mumps_tps_arr(thread_id_p)%LA -
957 & mumps_tps_arr(thread_id_p)%LRLUS
958 memneededforcb_p = memneeded_p -
959 & ( mumps_tps_arr(thread_id_p)%POSFAC - 1_8 )
960 IF ( memdispo_p .GE. memneeded_p ) THEN
961!$OMP ATOMIC CAPTURE
962 keep8(73) = keep8(73) + memneeded_p
963 keep8_73 = keep8(73)
964!$OMP END ATOMIC
965!$OMP ATOMIC READ
966 keep8_71 = keep8(71)
967!$OMP END ATOMIC
968 memdispo_p = peakauthorized_p - (keep8_73 -keep8_71)
969 memdispo_p = min(memdispo_p, keep8(75)-keep8_73)
970 IF ( memdispo_p .LT. 0 ) THEN
971!$OMP ATOMIC UPDATE
972 keep8(73) = keep8(73) - memneeded_p
973!$OMP END ATOMIC
974 IF ( state(thread_id_p) .NE. waitmem ) THEN
975 state( thread_id_p ) = waitmem
976 nbwaitmem = nbwaitmem + 1
977 ENDIF
978 ELSE
979!$OMP ATOMIC UPDATE
980 keep8(74) = max(keep8(74), keep8_73 )
981!$OMP END ATOMIC
982 IF ( state( thread_id_p ) .EQ. waitmem ) THEN
983 nbwaitmem = nbwaitmem - 1
984 ENDIF
985 state( thread_id_p ) = allocatevidercbencours
986 local_action = allocatevidercb
987 nbongoingcopies = nbongoingcopies + 1
988 ENDIF
989 ELSE
990 IF ( state(thread_id_p) .NE. waitmem ) THEN
991 state( thread_id_p ) = waitmem
992 nbwaitmem = nbwaitmem + 1
993 ENDIF
994 ENDIF
995 CASE DEFAULT
996 ith = -1
997 DO k = thread_id_p, thread_id_p + keep(400) - 1
998 IF ( k > keep(400) ) THEN
999 ith = k - keep(400)
1000 ELSE
1001 ith = k
1002 ENDIF
1003 IF ( state(ith) .GE. 0 .AND.
1004 & state(ith) .LT. mumps_tps_arr(ith)%POSFAC - 1_8 ) THEN
1005 EXIT
1006 ELSE
1007 ith = -1
1008 ENDIF
1009 ENDDO
1010 IF ( ith .GT. 0 ) THEN
1011 local_action = copy_factors
1012 copy_start = state(ith) + 1
1013 chunk8 = max(
1014 &
1015 & int(keep(361),8),
1016 &
1017 & (mumps_tps_arr(ith)%POSFAC+keep(400)-2_8) /
1018 & (int(keep(400)*2,8))
1019 &
1020 & )
1021 IF (keep(72) .EQ. 1) THEN
1022 chunk8 = 4_8
1023 ENDIF
1024 chunk8 = min( chunk8,
1025 & mumps_tps_arr(ith)%POSFAC - 1_8 - copy_start + 1_8
1026 & )
1027 state(ith) = state(ith) + chunk8
1028 ENDIF
1029 END SELECT
1030 ENDIF
1031!$OMP END CRITICAL(L0_COPIES)
1032 SELECT CASE ( local_action )
1033 CASE ( free_work_myid )
1034 IF ( associated(dmumps_tps_arr(thread_id_p)%A) ) THEN
1035 DEALLOCATE(dmumps_tps_arr(thread_id_p)%A)
1036 NULLIFY(dmumps_tps_arr(thread_id_p)%A)
1038 & -mumps_tps_arr(thread_id_p)%LA,
1039 & keep(405).EQ.1,
1040 & keep8,
1041 & info_p(1), info_p(2),
1042 & .false., .false. )
1043 IF (info_p(1) .GE. 0) THEN
1044!$OMP ATOMIC UPDATE
1045 keep8(69) = keep8(69) - l0_omp_factors(thread_id_p)%LA
1046!$OMP END ATOMIC
1047!$OMP CRITICAL(L0_COPIES)
1048 DO ith = 1, keep(400)
1049 IF ( state(ith) .EQ. waitmem ) THEN
1050 state(ith)=copynotstarted
1051 ENDIF
1052 ENDDO
1053 nbwaitmem = 0
1054 nbfinished = nbfinished + 1
1055 state( thread_id_p ) = finished
1056 nbongoingcopies = nbongoingcopies -1
1057!$OMP END CRITICAL(L0_COPIES)
1058 ENDIF
1059 ENDIF
1060 CASE ( allocatevidercb )
1061 to_allocate = max(mumps_tps_arr(thread_id_p)%POSFAC-1_8,1_8)
1062 ALLOCATE( l0_omp_factors(thread_id_p)%A(to_allocate),
1063 & stat=allocok )
1064 IF ( allocok .GT. 0 ) THEN
1065 info_p(1) = -13
1066 CALL mumps_seti8toi4(to_allocate, info_p(2))
1067 l0_omp_factors(thread_id_p)%LA = 0_8
1068!$OMP CRITICAL(L0_COPIES)
1069!$OMP ATOMIC UPDATE
1070 keep8(73) = keep8(73) - memneeded_p
1071!$OMP END ATOMIC
1072!$OMP END CRITICAL(L0_COPIES)
1073 ELSE
1074 l0_omp_factors(thread_id_p)%LA =
1075 & mumps_tps_arr(thread_id_p)%POSFAC-1_8
1076!$OMP ATOMIC UPDATE
1077 keep8(69) = keep8(69) + l0_omp_factors(thread_id_p)%LA
1078!$OMP END ATOMIC
1079!$OMP CRITICAL(L0_COPIES)
1080 IF ( mumps_tps_arr(thread_id_p)%POSFAC-1_8 == 0_8 ) THEN
1081 state(thread_id_p) = copyfactorsfinished
1082 ELSE
1083 state( thread_id_p ) = 0
1084 size_copied( thread_id_p ) = 0
1085 ENDIF
1086!$OMP END CRITICAL(L0_COPIES)
1087 lrlus_save_p = mumps_tps_arr(thread_id_p)%LRLUS
1089 & (3,
1090 & 0_8,
1091 & .false.,
1092 & myid_nodes, n, slavef, keep, keep8,
1093 & mumps_tps_arr(thread_id_p)%IW(1),
1094 & mumps_tps_arr(thread_id_p)%LIW,
1095 & mumps_tps_arr(thread_id_p)%IWPOSCB,
1096 & mumps_tps_arr(thread_id_p)%IWPOS,
1097 & dmumps_tps_arr(thread_id_p)%A(1),
1098 & mumps_tps_arr(thread_id_p)%LA,
1099 & mumps_tps_arr(thread_id_p)%LRLU,
1100 & mumps_tps_arr(thread_id_p)%IPTRLU,
1101 & mumps_tps_arr(thread_id_p)%LRLUS,
1102 & step, ptrast, pamaster, procnode_steps, dad,
1103 & info_p(1), info_p(2) )
1104 cbcopiedtodynamic_p =
1105 & mumps_tps_arr(thread_id_p)%LRLUS - lrlus_save_p
1106 IF (info_p(1) .LT. 0 ) THEN
1107!$OMP ATOMIC UPDATE
1108 keep8(73) = keep8(73) -
1109 & ( memneededforcb_p - cbcopiedtodynamic_p )
1110!$OMP END ATOMIC
1111 ELSE
1112 ENDIF
1113 ENDIF
1114 CASE ( copy_factors )
1115 DO i8 = copy_start, copy_start + chunk8 - 1
1116 l0_omp_factors(ith)%A(i8) = dmumps_tps_arr(ith)%A(i8)
1117 ENDDO
1118!$OMP CRITICAL(L0_COPIES)
1119 size_copied(ith) = size_copied(ith) + chunk8
1120 IF ( size_copied(ith) .EQ. l0_omp_factors(ith)%LA ) THEN
1121 state(ith) = copyfactorsfinished
1122 ENDIF
1123!$OMP END CRITICAL(L0_COPIES)
1124 CASE ( nothing )
1125 CASE ( dormir )
1126 CALL mumps_usleep(1000)
1127 CASE DEFAULT
1128 WRITE(*,*) " Internal error in DMUMPS_PERFORM_COPIES",
1129 & local_action
1130 END SELECT
1131 ENDDO
1132 RETURN
#define min(a, b)
Definition macros.h:20
subroutine mumps_set_ierror(size8, ierror)

◆ dmumps_perform_copies_init()

subroutine dmumps_fac_omp_m::dmumps_perform_copies_init ( integer(8), dimension(keep(400)), intent(out) state,
integer(8), intent(out) keep8_77_save,
integer, intent(out) nbwaitmem,
integer, intent(out) nbfinished,
integer, intent(out) nbongoingcopies,
integer, intent(out) nbunderl0,
integer, dimension(500), intent(in) keep,
integer(8), dimension(150), intent(in) keep8 )

Definition at line 824 of file dfac_omp_m.F.

827 INTEGER, INTENT(IN) :: KEEP(500)
828 INTEGER(8), INTENT(IN) :: KEEP8(150)
829 INTEGER, INTENT(OUT) :: NbWaitMem,
830 & NbFinished,
831 & NbOnGoingCopies,
832 & NbUnderL0
833 INTEGER(8), INTENT(OUT) :: STATE(KEEP(400)), KEEP8_77_SAVE
834 INTEGER :: ITH
835 nbwaitmem = 0
836 nbfinished = 0
837 nbongoingcopies = 0
838 nbunderl0 = keep(400)
839 DO ith=1, keep(400)
840 state(ith) = underl0
841 ENDDO
842 keep8_77_save = keep8(77)
843 RETURN

◆ dmumps_set_maxs_maxis_thread()

subroutine dmumps_fac_omp_m::dmumps_set_maxs_maxis_thread ( integer(8), intent(out) maxs_base_relaxed8th,
integer, intent(out) maxis_base_relaxedth,
integer, intent(out) blr_strat,
integer, dimension(500), intent(in) keep,
integer, dimension(nbstats_i4), intent(in) i4_l0_ompth,
integer, intent(in) nbstats_i4,
integer(8), dimension(nbstats_i8), intent(in) i8_l0_ompth,
integer, intent(in) nbstats_i8 )

Definition at line 645 of file dfac_omp_m.F.

650 IMPLICIT NONE
651 INTEGER, INTENT(IN) :: KEEP(500), NBSTATS_I4, NBSTATS_I8
652 INTEGER, INTENT(IN) :: I4_L0_OMPTH(NBSTATS_I4)
653 INTEGER(8), INTENT(IN) :: I8_L0_OMPTH(NBSTATS_I8)
654 INTEGER(8), INTENT(OUT) :: MAXS_BASE_RELAXED8TH
655 INTEGER, INTENT(OUT) :: MAXIS_BASE_RELAXEDTH
656 INTEGER, INTENT(OUT) :: BLR_STRAT
657 INTEGER :: PERLU
658 INTEGER(8) :: MAXS_BASE8TH
659 INTEGER(8) :: MAXIS_BASE_RELAXEDTH8
660 perlu = keep(12)
661 CALL dmumps_set_blrstrat_and_maxs ( maxs_base8th,
662 & maxs_base_relaxed8th, blr_strat, keep(1),
663 & i8_l0_ompth(2), i8_l0_ompth(3), i8_l0_ompth(5),
664 & i8_l0_ompth(6), i8_l0_ompth(7), i8_l0_ompth(8) )
665 IF ( keep(201) .EQ. 0 ) THEN
666 maxis_base_relaxedth8 = int(i4_l0_ompth(2),8)
667 ELSE
668 maxis_base_relaxedth8 = int(i4_l0_ompth(4),8)
669 ENDIF
670 maxis_base_relaxedth8 = max( 1_8,
671 & maxis_base_relaxedth8 + 3 * max(perlu,10) *
672 & ( maxis_base_relaxedth8 / 100 + 1 )
673 & )
674 maxis_base_relaxedth8 = min(maxis_base_relaxedth8,
675 & int( huge( maxis_base_relaxedth ) ,8)
676 & )
677 maxis_base_relaxedth = int( maxis_base_relaxedth8 )
678 RETURN
subroutine dmumps_set_blrstrat_and_maxs(maxs_base8, maxs_base_relaxed8, blr_strat, keep, nrlnec, nrlnec_active, nrlnec_if_lr_lu, nrlnec_if_lr_lucb, nrlnecooc_if_lr_lucb, nrlnec_if_lr_cb)
Definition dtools.F:1191

Variable Documentation

◆ allocatevidercbencours

integer(8), parameter dmumps_fac_omp_m::allocatevidercbencours = -16_8

Definition at line 19 of file dfac_omp_m.F.

19 INTEGER(8), PARAMETER :: AllocateViderCBEnCours = -16_8

◆ copyfactorsfinished

integer(8), parameter dmumps_fac_omp_m::copyfactorsfinished = -17_8

Definition at line 18 of file dfac_omp_m.F.

18 INTEGER(8), PARAMETER :: CopyFactorsFinished = -17_8

◆ copynotstarted

integer(8), parameter dmumps_fac_omp_m::copynotstarted = -19_8

Definition at line 16 of file dfac_omp_m.F.

16 INTEGER(8), PARAMETER :: CopyNotStarted = -19_8

◆ finished

integer(8), parameter dmumps_fac_omp_m::finished = -15_8

Definition at line 20 of file dfac_omp_m.F.

20 INTEGER(8), PARAMETER :: Finished = -15_8

◆ underl0

integer(8), parameter dmumps_fac_omp_m::underl0 = -20_8

Definition at line 15 of file dfac_omp_m.F.

15 INTEGER(8), PARAMETER :: UnderL0 = -20_8

◆ waitmem

integer(8), parameter dmumps_fac_omp_m::waitmem = -18_8

Definition at line 17 of file dfac_omp_m.F.

17 INTEGER(8), PARAMETER :: WaitMem = -18_8