added timing facilities for LpAndItsTangent
This commit is contained in:
parent
a8db780af4
commit
eed32fe588
|
@ -652,6 +652,7 @@
|
|||
logical failed
|
||||
integer(pInt) cp_en, ip, grain
|
||||
integer(pInt) iInner,dummy, i,j,k,l,m,n
|
||||
integer(8) tick,tock,tickrate,maxticks
|
||||
real(pReal) dt, Temperature, det, p_hydro, leapfrog,maxleap
|
||||
real(pReal), dimension(6) :: Tstar_v
|
||||
real(pReal), dimension(9,9) :: dLp,dTdLp,dRdLp,invdRdLp,eye2
|
||||
|
@ -701,7 +702,12 @@ Inner: do ! inner iteration: Lp
|
|||
Tstar_v = 0.5_pReal*math_mul66x6(C_66,math_mandel33to6(math_mul33x33(BT,AB)-math_I3))
|
||||
p_hydro=(Tstar_v(1)+Tstar_v(2)+Tstar_v(3))/3.0_pReal
|
||||
forall(i=1:3) Tstar_v(i) = Tstar_v(i)-p_hydro ! subtract hydrostatic pressure
|
||||
call system_clock(count=tick,count_rate=tickrate,count_max=maxticks)
|
||||
call constitutive_LpAndItsTangent(Lp,dLp, Tstar_v,Temperature,grain,ip,cp_en)
|
||||
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
|
||||
debug_cumLpCalls = debug_cumLpCalls + 1_pInt
|
||||
debug_cumLpTicks = debug_cumLpTicks + tock-tick
|
||||
if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks
|
||||
Rinner = Lpguess - Lp ! update current residuum
|
||||
|
||||
if (.not.(any(Rinner/=Rinner)) .and. & ! exclude any NaN in residuum
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
integer(pInt), dimension(nCutback+1) :: debug_cutbackDistribution = 0_pInt
|
||||
integer(pInt), dimension(nInner) :: debug_InnerLoopDistribution = 0_pInt
|
||||
integer(pInt), dimension(nOuter) :: debug_OuterLoopDistribution = 0_pInt
|
||||
integer(8) :: debug_cumLpTicks = 0_pInt
|
||||
integer(pInt) :: debug_cumLpCalls = 0_pInt
|
||||
logical :: debugger = .false.
|
||||
logical :: distribution_init = .false.
|
||||
|
||||
|
@ -23,9 +25,19 @@
|
|||
use prec
|
||||
implicit none
|
||||
|
||||
integer(pInt) i
|
||||
integer(pInt) i,integral
|
||||
integer(8) tickrate
|
||||
|
||||
write(6,*)
|
||||
write(6,*) 'DEBUG Info'
|
||||
write(6,*)
|
||||
write(6,'(a33,x,i9)') 'total calls to LpAndItsTangent :',debug_cumLpCalls
|
||||
if (debug_cumLpCalls > 0_pInt) then
|
||||
call system_clock(count_rate=tickrate)
|
||||
write(6,'(a33,x,f10.6)') 'avg CPU time/microsecs per call :',dble(debug_cumLpTicks)/tickrate/1.0e-6_pReal/debug_cumLpCalls
|
||||
write(6,'(a33,x,i12)') 'total CPU ticks :',debug_cumLpTicks
|
||||
endif
|
||||
write(6,*)
|
||||
write(6,*) 'distribution_cutback :'
|
||||
do i=0,nCutback
|
||||
if (debug_cutbackDistribution(i+1) /= 0) write(6,*) i,debug_cutbackDistribution(i+1)
|
||||
|
@ -33,18 +45,26 @@
|
|||
write(6,*) 'total',sum(debug_cutbackDistribution)
|
||||
write(6,*)
|
||||
|
||||
integral = 0_pInt
|
||||
write(6,*) 'distribution_InnerLoop :'
|
||||
do i=1,nInner
|
||||
if (debug_InnerLoopDistribution(i) /= 0) write(6,*) i,debug_InnerLoopDistribution(i)
|
||||
if (debug_InnerLoopDistribution(i) /= 0) then
|
||||
integral = integral + i*debug_InnerLoopDistribution(i)
|
||||
write(6,*) i,debug_InnerLoopDistribution(i)
|
||||
endif
|
||||
enddo
|
||||
write(6,*) 'total',sum(debug_InnerLoopDistribution)
|
||||
write(6,*) 'total',sum(debug_InnerLoopDistribution),integral
|
||||
write(6,*)
|
||||
|
||||
integral = 0_pInt
|
||||
write(6,*) 'distribution_OuterLoop :'
|
||||
do i=1,nOuter
|
||||
if (debug_OuterLoopDistribution(i) /= 0) write(6,*) i,debug_OuterLoopDistribution(i)
|
||||
if (debug_OuterLoopDistribution(i) /= 0) then
|
||||
integral = integral + i*debug_OuterLoopDistribution(i)
|
||||
write(6,*) i,debug_OuterLoopDistribution(i)
|
||||
endif
|
||||
enddo
|
||||
write(6,*) 'total',sum(debug_OuterLoopDistribution)
|
||||
write(6,*) 'total',sum(debug_OuterLoopDistribution),integral
|
||||
write(6,*)
|
||||
|
||||
END SUBROUTINE
|
||||
|
|
|
@ -167,6 +167,8 @@
|
|||
debug_cutbackDistribution = 0_pInt ! initialize debugging data
|
||||
debug_InnerLoopDistribution = 0_pInt
|
||||
debug_OuterLoopDistribution = 0_pInt
|
||||
debug_cumLpTicks = 0
|
||||
debug_cumLpCalls = 0_pInt
|
||||
endif
|
||||
endif
|
||||
if (cptim > theTime .or. theInc /= inc) then ! reached convergence
|
||||
|
|
|
@ -143,8 +143,7 @@
|
|||
! ** End of generated type statements **
|
||||
!
|
||||
dimension e(*),de(*),t(*),dt(*),g(*),d(ngens,*),s(*), n(2),coord(ncrd,*),disp(ndeg,*),matus(2),dispt(ndeg,*),ffn(itel,*),&
|
||||
frotn(itel,*),strechn(itel),eigvn(itel,*),ffn1(itel,*),frotn1(itel,*),strechn1(itel),eigvn1(itel,*),kcus(2),&
|
||||
lclass(2)
|
||||
frotn(itel,*),strechn(itel),eigvn(itel,*),ffn1(itel,*),frotn1(itel,*),strechn1(itel),eigvn1(itel,*),kcus(2)
|
||||
|
||||
! Marc common blocks are in fixed format so they have to be reformated to free format (f90)
|
||||
! Beware of changes in newer Marc versions
|
||||
|
@ -168,6 +167,8 @@
|
|||
debug_cutbackDistribution = 0_pInt ! initialize debugging data
|
||||
debug_InnerLoopDistribution = 0_pInt
|
||||
debug_OuterLoopDistribution = 0_pInt
|
||||
debug_cumLpTicks = 0
|
||||
debug_cumLpCalls = 0_pInt
|
||||
endif
|
||||
endif
|
||||
if (cptim > theTime .or. theInc /= inc) then ! reached convergence
|
||||
|
|
Loading…
Reference in New Issue