53
54
55
58 USE matparam_def_mod
59 use element_mod , only : nixs,nixq,nixc,nixp,nixt,nixr,nixtg
60
61
62
63#include "implicit_f.inc"
64
65
66
67#include "param_c.inc"
68#include "com01_c.inc"
69#include "scr17_c.inc"
70#include "tablen_c.inc"
71#include "scr23_c.inc"
72#include "ddspmd_c.inc"
73#include "units_c.inc"
74
75
76
77 INTEGER IDARCH,
78 . NUMELS,NUMELQ,NUMELC,NUMELT,NUMELP,
79 . NUMELR,NUMELTG,NUMELX,
80 . NUMMAT,NUMGEO,TAILLE,
81 . IXS(NIXS,*),IXQ(NIXQ,*),IXC(NIXC,*),
82 . IXT(NIXT,*), IXP(NIXP,*), IXR(NIXR,*), IXTG(NIXTG,*),
83 . KXX(NIXX,*),IGEO(NPROPGI,*),ISOLNOD(*),
84 . IPM(NPROPMI,*),TABMP_L,NPART,IDDLEVEL
85 INTEGER, DIMENSION(NUMMAT_OLD) :: POIN_UMP_OLD
86 INTEGER, DIMENSION(7,TAILLE_OLD) :: TAB_UMP_OLD
87 INTEGER, DIMENSION(NUMMAT) :: POIN_UMP
88 INTEGER, DIMENSION(7,TAILLE) :: TAB_UMP
89 INTEGER, DIMENSION(LIPART1,*), INTENT(IN) :: IPART
90 INTEGER, DIMENSION(*), INTENT(IN) :: IPARTC,IPARTG,IPARTS
91
92 INTEGER, DIMENSION(2,NPART), INTENT(INOUT) :: POIN_PART_SHELL,POIN_PART_TRI
93 INTEGER, DIMENSION(2,NPART,7), INTENT(INOUT) :: POIN_PART_SOL
94 TYPE(MID_PID_TYPE), DIMENSION(NUMMAT), INTENT(INOUT) :: MID_PID_SHELL,MID_PID_TRI
95 TYPE(MID_PID_TYPE), DIMENSION(NUMMAT,7), INTENT(INOUT) :: MID_PID_SOL
96
97
99 . pm(npropm,*), geo(npropg,*),bufmat(*)
100 my_real,
DIMENSION(TAILLE_OLD) :: cputime_mp_old
101 REAL WD(*)
102 TYPE(MATPARAM_STRUCT_) ,DIMENSION(NUMMAT), INTENT(IN) :: MAT_PARAM
103
104 INTEGER OFF, NPN, MID, PID, JHBE, IGT, MLN,
105 . ISTRAIN, ITHK, IHBE, IPLA, ISSN, MTN, I, J, K,L,
106 . NFUNC,MPT,NPTS,NPTT,NPTR,NPTOT,IFLAG,JSROT,
107 . NFUNC1,NFUNC2,IRUP,II,IRUP2,IRUP_TAB(6),
108 . I_MID,I_PID,I_MID_OLD,I_PID_OLD,PUID,MUID,
109 . ELM_TYP,ELM_TYP_OLD,ILAW,ILAW_OLD,TEST_MAT,
110 . I_PRO,ISOL,MID_OLD,PID_OLD,MUID_OLD,PUID_OLD,
111 . TEST,RECHERCHE,NUMEL_RE,IAD,INDI,
112 . MAX_ELM_OLD,MAX_ELM,MAX_ELM_OLD_36_2,MAX_ELM_36_2,
113 . K_36_2,I_PRO_36_2,NBR_ELM
114
115 INTEGER, DIMENSION(TAILLE) :: CONCORDANCE_MAT
116 real
117 . wtype(9),fwihbe,fac8,
118 . tabmat(3),tabx(3),timmat,npt,telt,poids,w,
119 . batozmult,tmat,tabrup(3),trup_local,trup
121
122 INTEGER, DIMENSION(NUMMAT) :: PID_SHELL,PID_TRI
123 INTEGER, DIMENSION(NUMMAT,7) :: PID_SOL
124 INTEGER :: IPID,ID,IGTYP,MODE
125
127 . cc, invtref,a,b,a1,a2
128 my_real,
DIMENSION(TAILLE_OLD) :: cputime_mp_old_2
129 INTEGER :: SIZE_IRUP
130
131
132 DATA wtype /1.6 ,1. ,1. ,.9 ,1.1 ,1.4 ,0.65 ,.9 ,2.0/
133
134
135
136 size_irup = 0
137 DO i = 1, nummat
138 size_irup =
max(size_irup, mat_param(i)%NFAIL)
139 ENDDO
140
141 IF(iddlevel==0) THEN
142 poin_part_shell(1:2,1:npart) = 0
143 poin_part_tri(1:2,1:npart) = 0
144 poin_part_sol(1:2,1:npart,1:7) = 0
145 pid_shell(1:nummat) = 0
146 pid_tri(1:nummat) = 0
147 pid_sol(1:nummat,1:7) = 0
148
149
150 mode = 0
152 1 tab_ump ,pid_shell ,pid_tri ,pid_sol,
153 2 mid_pid_shell ,mid_pid_tri ,mid_pid_sol,
154 3 ipart ,ipm ,geo ,cputime_mp_old_2,
155 4 poin_part_shell,poin_part_tri,poin_part_sol)
156 ENDIF
157 concordance_mat(1:taille) = 0
158
159 IF(domdec_tuning/=0) WRITE(iout,'(A)')
160 . ' DOMAIN DECOMPOSITION : MANUAL TUNING'
161 IF(dd_optimization==1) THEN
162
163 WRITE(iout,'(A)')
164 . ' DOMAIN DECOMPOSITION : OPTIMIZED FOR SKYLAKE PROCESSOR'
165 ELSEIF(dd_optimization==2) THEN
166
167 WRITE(iout,'(A)')
168 . ' DOMAIN DECOMPOSITION : OPTIMIZED FOR SANDY BRIDGE PROCESSOR'
169 ELSEIF(dd_optimization==3) THEN
170
171 WRITE(iout,'(A)')
172 . ' DOMAIN DECOMPOSITION : OPTIMIZED FOR ARM64 PROCESSOR'
173 ELSEIF(dd_optimization==0.OR.dd_optimization==4) THEN
174
175 dd_optimization = 0
176 WRITE(iout,'(A)')
177 . ' DOMAIN DECOMPOSITION : OPTIMIZED FOR BROADWELL PROCESSOR'
178 ENDIF
179
180 i_pro = 0
181 i_pro_36_2 = 0
182 IF( (test_poids==1).AND.
183 . (nummat_old/=0).AND.
184 . (numgeo_old/=0).AND.
185 . (taille_old/=0) ) THEN
186
187
188 max_elm = -1
189 max_elm_old = -1
190 max_elm_36_2 = -1
191 max_elm_old_36_2 = -1
192 DO i=1,taille_old
193 ilaw_old = tab_ump_old(6,i)
194 muid_old = tab_ump_old(1,i)
195 mid_old = tab_ump_old(3,i)
196 puid_old = tab_ump_old(2,i)
197 elm_typ_old = tab_ump_old(7,i)
198 pid_old = tab_ump_old(4,i)
199
200 IF(cputime_mp_old(i)>zero) THEN
201 DO j=1,taille
202 ilaw = tab_ump(6,j)
203 muid = tab_ump(1,j)
204 mid = tab_ump(3,j)
205 puid = tab_ump(2,j)
206 elm_typ = tab_ump(7,j)
207 pid = tab_ump(4,j)
208
209 IF((ilaw==ilaw_old).AND.(muid_old==muid).AND.
210 . (puid_old==puid).AND.(elm_typ==elm_typ_old) ) THEN
211 concordance_mat(j) = i
212
213
214 IF((ilaw/=0).OR.(ilaw/=29).OR.(ilaw/=30).OR.
215 . (ilaw/=31).OR.(ilaw<99)) THEN
216 max_elm_old = max_elm
217 max_elm =
max(max_elm,tab_ump_old(5,i))
218
219 IF((ilaw==2).OR.(ilaw==36)) THEN
220 max_elm_old_36_2 = max_elm_36_2
221 max_elm_36_2 =
max(max_elm_36_2,tab_ump_old(5,i))
222 IF( (max_elm_old_36_2<max_elm_36_2) ) i_pro_36_2 = j
223 ENDIF
224 IF( (max_elm_old<max_elm) ) i_pro = j
225 ENDIF
226 ENDIF
227 ENDDO
228 ENDIF
229 ENDDO
230
231
232
233 i=0
234 test_mat = 0
235 recherche = 1
236 numel_re = 1
237 k = 0
238 off = 0
239 IF(i_pro_36_2>0) THEN
240 k_36_2 = concordance_mat(i_pro_36_2)
241 nbr_elm = tab_ump_old(5,k_36_2)
242 IF(nbr_elm>1024) i_pro = i_pro_36_2
243 ENDIF
244 IF(i_pro>0) k = concordance_mat(i_pro)
245 IF(k/=0) THEN
246 elm_typ_old = tab_ump_old(7,k)
247 mln = tab_ump_old(6,k)
248 mid = tab_ump_old(3,k)
249 pid = tab_ump_old(4,k)
250
251
252 IF(elm_typ_old==3) THEN
253 test_mat = 1
255 . numel_re,ipm,nummat,numgeo,poin_part_shell,
256 . mid_pid_shell,ipartc,off,bufmat,
257 . mid,pid,mln,recherche,telt_pro,
258 . tabmp_l,mat_param)
259
260
261 ELSEIF(elm_typ_old==7) THEN
262 test_mat = 1
263 CALL initwg_tri(wd,pm,geo,ixtg,igeo,numel_re,ipm ,size_irup,
264 . nummat,numgeo,poin_part_tri,mid_pid_tri,ipartg,
265 . off,bufmat,mid,pid,mln,recherche,telt_pro,
266 . tabmp_l,mat_param)
267
268
269
270 ELSEIF((elm_typ_old==1004).OR.(elm_typ_old==1010).OR.
271 . (elm_typ_old==1) .OR.(elm_typ_old==1006).OR.
272 . (elm_typ_old==1008).OR.(elm_typ_old==1016).OR.
273 . (elm_typ_old==1020)) THEN
274 test_mat = 1
275 IF(elm_typ_old>1000) THEN
276 isol = elm_typ_old - 1000
277 ELSE
278 isol = 1
279 ENDIF
281 . numel_re,ipm ,size_irup,
282 . nummat,numgeo,
283 . poin_part_sol,mid_pid_sol,iparts,bufmat,
284 . mid,pid,mln,recherche,isol,
285 . telt_pro,tabmp_l,npart,mat_param)
286 ENDIF
287
288
289
290
291 invtelt_pro = telt_pro/cputime_mp_old(k)
292 DO i=1,taille_old
293 IF(cputime_mp_old(i)>zero) THEN
294 cputime_mp_old_2(i) = cputime_mp_old(i) * invtelt_pro
295 ELSE
296 cputime_mp_old_2(i) = zero
297 ENDIF
298 ENDDO
299 mode = 1
301 1 tab_ump ,pid_shell ,pid_tri ,pid_sol,
302 2 mid_pid_shell ,mid_pid_tri ,mid_pid_sol,
303 3 ipart ,ipm ,geo ,cputime_mp_old_2,
304 4 poin_part_shell,poin_part_tri,poin_part_sol)
305
306 ENDIF
307
308 ENDIF
309
310 recherche = 0
311 mid = 0
312 pid = 0
313 mln = 0
314 isol = 0
315
316
317
319 . numels,ipm ,size_irup,
320 . nummat,numgeo,
321 . poin_part_sol,mid_pid_sol,iparts,bufmat,
322 . mid,pid,mln,recherche,isol,
323 . telt_pro,tabmp_l,npart,mat_param)
324
325 off = numels
326
328 . numelq,ipm,off)
329
330 off = off + numelq
331
333 . numelc,ipm,nummat,numgeo,poin_part_shell,
334 . mid_pid_shell,ipartc,off,bufmat,
335 . mid,pid,mln,recherche,telt_pro,
336 . tabmp_l,mat_param)
337
338 off = off + numelc
339
341 . numelt,ipm,nummat,numgeo,off)
342
343 off = off + numelt
344
346 . numelp,ipm,nummat,numgeo,off)
347
348 off = off + numelp
349
351 . numelr,ipm,nummat,numgeo,off)
352
353 off = off + numelr
354
355 CALL initwg_tri(wd,pm,geo,ixtg,igeo,numeltg,ipm , size_irup,
356 . nummat,numgeo,poin_part_tri,mid_pid_tri,ipartg,
357 . off,bufmat,mid,pid,mln,recherche,telt_pro,
358 . tabmp_l,mat_param)
359
360 off = off + numeltg
361
363 . numelx,ipm,nummat,numgeo,off)
364
365 off = off + numelx
366
367
368 RETURN
subroutine init_mid_pid_array(mode, taille, nummat, npart, concordance_mat, tab_ump, pid_shell, pid_tri, pid_sol, mid_pid_shell, mid_pid_tri, mid_pid_sol, ipart, ipm, geo, cputime_mp_old_2, poin_part_shell, poin_part_tri, poin_part_sol)
subroutine initwg_poutre(wd, pm, geo, ixp, igeo, numelp, ipm, nummat, numgeo, off)
subroutine initwg_quad(wd, pm, geo, ixq, igeo, numelq, ipm, off)
subroutine initwg_ressort(wd, pm, geo, ixr, igeo, numelr, ipm, nummat, numgeo, off)
subroutine initwg_shell(wd, pm, geo, ixc, igeo, size_irup, numelc, ipm, nummat, numgeo, poin_part_shell, mid_pid_shell, ipartc, off, bufmat, mid_old, pid_old, mln_old, recherche, telt_pro, tabmp_l, mat_param)
subroutine initwg_solid(wd, pm, geo, ixs, igeo, isolnod, numels, ipm, size_irup, nummat, numgeo, poin_part_sol, mid_pid_sol, iparts, bufmat, mid_old, pid_old, mln_old, recherche, isol_old, telt_pro, tabmp_l, npart, mat_param)
subroutine initwg_tri(wd, pm, geo, ixtg, igeo, numeltg, ipm, size_irup, nummat, numgeo, poin_part_tri, mid_pid_tri, ipartg, off, bufmat, mid_old, pid_old, mln_old, recherche, telt_pro, tabmp_l, mat_param)
subroutine initwg_truss(wd, pm, geo, ixt, igeo, numelt, ipm, nummat, numgeo, off)
subroutine initwg_x(wd, pm, geo, kxx, igeo, numelx, ipm, nummat, numgeo, off)