performance profiling should not be part of the source code

This commit is contained in:
Arka Lahiri 2018-05-09 16:35:09 +02:00
parent 991c917076
commit 90e9b98584
4 changed files with 201 additions and 201 deletions

View File

@ -838,8 +838,8 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra
pReal, &
pLongInt
use debug, only: &
debug_cumDotStateCalls, &
debug_cumDotStateTicks, &
!debug_cumDotStateCalls, &
!debug_cumDotStateTicks, &
debug_level, &
debug_constitutive, &
debug_levelBasic
@ -951,10 +951,10 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra
if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
!$OMP CRITICAL (debugTimingDotState)
debug_cumDotStateCalls = debug_cumDotStateCalls + 1_pInt
debug_cumDotStateTicks = debug_cumDotStateTicks + tock-tick
!debug_cumDotStateCalls = debug_cumDotStateCalls + 1_pInt
!debug_cumDotStateTicks = debug_cumDotStateTicks + tock-tick
!$OMP FLUSH (debug_cumDotStateTicks)
if (tock < tick) debug_cumDotStateTicks = debug_cumDotStateTicks + maxticks
!if (tock < tick) debug_cumDotStateTicks = debug_cumDotStateTicks + maxticks
!$OMP END CRITICAL (debugTimingDotState)
endif
end subroutine constitutive_collectDotState
@ -968,8 +968,8 @@ subroutine constitutive_collectDeltaState(Tstar_v, Fe, ipc, ip, el)
pReal, &
pLongInt
use debug, only: &
debug_cumDeltaStateCalls, &
debug_cumDeltaStateTicks, &
!debug_cumDeltaStateCalls, &
!debug_cumDeltaStateTicks, &
debug_level, &
debug_constitutive, &
debug_levelBasic
@ -1035,10 +1035,10 @@ subroutine constitutive_collectDeltaState(Tstar_v, Fe, ipc, ip, el)
if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
!$OMP CRITICAL (debugTimingDeltaState)
debug_cumDeltaStateCalls = debug_cumDeltaStateCalls + 1_pInt
debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + tock-tick
!debug_cumDeltaStateCalls = debug_cumDeltaStateCalls + 1_pInt
!debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + tock-tick
!$OMP FLUSH (debug_cumDeltaStateTicks)
if (tock < tick) debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + maxticks
!if (tock < tick) debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + maxticks
!$OMP END CRITICAL (debugTimingDeltaState)
endif

View File

@ -529,8 +529,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
debug_levelSelective, &
debug_e, &
debug_i, &
debug_g, &
debug_CrystalliteLoopDistribution
debug_g!, &
!debug_CrystalliteLoopDistribution
use IO, only: &
IO_warning, &
IO_error
@ -949,8 +949,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt &
.and. formerSubStep > 0.0_pReal) then
!$OMP CRITICAL (distributionCrystallite)
debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = &
debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt
!debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = &
!debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt
!$OMP END CRITICAL (distributionCrystallite)
endif
endif
@ -1259,8 +1259,8 @@ subroutine crystallite_integrateStateRK4()
debug_crystallite, &
debug_levelBasic, &
debug_levelExtensive, &
debug_levelSelective, &
debug_StateLoopDistribution
debug_levelSelective !, &
!debug_StateLoopDistribution
use FEsolving, only: &
FEsolving_execElem, &
FEsolving_execIP
@ -1519,8 +1519,8 @@ subroutine crystallite_integrateStateRK4()
crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(4,numerics_integrationMode) = &
debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt
!debug_StateLoopDistribution(4,numerics_integrationMode) = &
!debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState)
endif
endif
@ -1555,8 +1555,8 @@ subroutine crystallite_integrateStateRKCK45()
debug_crystallite, &
debug_levelBasic, &
debug_levelExtensive, &
debug_levelSelective, &
debug_StateLoopDistribution
debug_levelSelective!, &
!debug_StateLoopDistribution
use numerics, only: &
rTol_crystalliteState, &
numerics_integrationMode
@ -2023,8 +2023,8 @@ subroutine crystallite_integrateStateRKCK45()
crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definition
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(6,numerics_integrationMode) = &
debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt
!debug_StateLoopDistribution(6,numerics_integrationMode) = &
!debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState)
endif
endif
@ -2060,8 +2060,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
debug_crystallite, &
debug_levelBasic, &
debug_levelExtensive, &
debug_levelSelective, &
debug_StateLoopDistribution
debug_levelSelective!, &
!debug_StateLoopDistribution
use numerics, only: &
rTol_crystalliteState, &
numerics_integrationMode
@ -2365,8 +2365,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
crystallite_converged(g,i,e) = .true. ! ... converged per definitionem
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(2,numerics_integrationMode) = &
debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt
!debug_StateLoopDistribution(2,numerics_integrationMode) = &
!debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState)
endif
endif
@ -2383,8 +2383,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
crystallite_converged(g,i,e) = .true. ! ... converged per definitionem
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(2,numerics_integrationMode) = &
debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt
!debug_StateLoopDistribution(2,numerics_integrationMode) = &
!debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState)
endif
endif
@ -2422,8 +2422,8 @@ subroutine crystallite_integrateStateEuler()
debug_crystallite, &
debug_levelBasic, &
debug_levelExtensive, &
debug_levelSelective, &
debug_StateLoopDistribution
debug_levelSelective!, &
!debug_StateLoopDistribution
use numerics, only: &
numerics_integrationMode, &
numerics_timeSyncing
@ -2608,8 +2608,8 @@ eIter = FEsolving_execElem(1:2)
crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(1,numerics_integrationMode) = &
debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt
!debug_StateLoopDistribution(1,numerics_integrationMode) = &
!debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState)
endif
endif
@ -2647,8 +2647,8 @@ subroutine crystallite_integrateStateFPI()
debug_crystallite, &
debug_levelBasic, &
debug_levelExtensive, &
debug_levelSelective, &
debug_StateLoopDistribution
debug_levelSelective!, &
!debug_StateLoopDistribution
use numerics, only: &
nState, &
numerics_integrationMode, &
@ -3025,8 +3025,8 @@ subroutine crystallite_integrateStateFPI()
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = &
debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt
!debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = &
!debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState)
endif
endif
@ -3246,12 +3246,12 @@ logical function crystallite_integrateStress(&
#ifdef DEBUG
debug_e, &
debug_i, &
debug_g, &
debug_g!, &
#endif
debug_cumLpCalls, &
debug_cumLpTicks, &
debug_StressLoopLpDistribution, &
debug_StressLoopLiDistribution
!debug_cumLpCalls, &
!debug_cumLpTicks, &
!debug_StressLoopLpDistribution, &
!debug_StressLoopLiDistribution
use constitutive, only: constitutive_LpAndItsTangent, &
constitutive_LiAndItsTangent, &
constitutive_TandItsTangent
@ -3477,10 +3477,10 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
!$OMP CRITICAL (debugTimingLpTangent)
debug_cumLpCalls = debug_cumLpCalls + 1_pInt
debug_cumLpTicks = debug_cumLpTicks + tock-tick
!debug_cumLpCalls = debug_cumLpCalls + 1_pInt
!debug_cumLpTicks = debug_cumLpTicks + tock-tick
!$OMP FLUSH (debug_cumLpTicks)
if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks
!if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks
!$OMP END CRITICAL (debugTimingLpTangent)
endif
@ -3583,8 +3583,8 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionStress)
debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = &
debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt
!debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = &
!debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionStress)
endif
@ -3670,8 +3670,8 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionStress)
debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = &
debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt
!debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = &
!debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionStress)
endif

View File

@ -46,20 +46,20 @@ module debug
integer(pInt),protected, dimension(debug_maxNtype+2_pInt), public :: & ! specific ones, and 2 for "all" and "other"
debug_level = 0_pInt
integer(pLongInt), public :: &
debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent
debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState
debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState
!integer(pLongInt), public :: &
!debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent
!debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState
!debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState
integer(pInt), protected, public :: &
debug_e = 1_pInt, &
debug_i = 1_pInt, &
debug_g = 1_pInt
integer(pLongInt), public :: &
debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent
debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState
debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState
!integer(pLongInt), public :: &
!debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent
!debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState
!debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState
integer(pInt), dimension(2), public :: &
debug_stressMaxLocation = 0_pInt, &
@ -68,15 +68,15 @@ module debug
debug_jacobianMinLocation = 0_pInt
integer(pInt), dimension(:), allocatable, public :: &
debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks
debug_MaterialpointStateLoopDistribution, &
debug_MaterialpointLoopDistribution
!integer(pInt), dimension(:), allocatable, public :: &
!debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks
!debug_MaterialpointStateLoopDistribution, &
!debug_MaterialpointLoopDistribution
integer(pInt), dimension(:,:), allocatable, public :: &
debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence
debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence
debug_StateLoopDistribution !< distribution of state iterations until convergence
!integer(pInt), dimension(:,:), allocatable, public :: &
!debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence
!debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence
!debug_StateLoopDistribution !< distribution of state iterations until convergence
real(pReal), public :: &
debug_stressMax = -huge(1.0_pReal), &
@ -107,12 +107,12 @@ subroutine debug_init
compiler_version, &
compiler_options
#endif
use numerics, only: &
nStress, &
nState, &
nCryst, &
nMPstate, &
nHomog
! use numerics, only: &
! nStress, &
! nState, &
! nCryst, &
! nMPstate, &
! nHomog
use IO, only: &
IO_read, &
IO_error, &
@ -137,12 +137,12 @@ subroutine debug_init
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt)
allocate(debug_StressLoopLiDistribution(nStress+1,2), source=0_pInt)
allocate(debug_StateLoopDistribution(nState+1,2), source=0_pInt)
allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt)
allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt)
allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt)
!allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt)
!allocate(debug_StressLoopLiDistribution(nStress+1,2), source=0_pInt)
!allocate(debug_StateLoopDistribution(nState+1,2), source=0_pInt)
!allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt)
!allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt)
!allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt)
!--------------------------------------------------------------------------------------------------
! try to open the config file
@ -297,18 +297,18 @@ subroutine debug_reset
implicit none
debug_StressLoopLpDistribution = 0_pInt
debug_StressLoopLiDistribution = 0_pInt
debug_StateLoopDistribution = 0_pInt
debug_CrystalliteLoopDistribution = 0_pInt
debug_MaterialpointStateLoopDistribution = 0_pInt
debug_MaterialpointLoopDistribution = 0_pInt
debug_cumLpTicks = 0_pLongInt
debug_cumDeltaStateTicks = 0_pLongInt
debug_cumDotStateTicks = 0_pLongInt
debug_cumLpCalls = 0_pInt
debug_cumDeltaStateCalls = 0_pInt
debug_cumDotStateCalls = 0_pInt
!debug_StressLoopLpDistribution = 0_pInt
!debug_StressLoopLiDistribution = 0_pInt
!debug_StateLoopDistribution = 0_pInt
!debug_CrystalliteLoopDistribution = 0_pInt
!debug_MaterialpointStateLoopDistribution = 0_pInt
!debug_MaterialpointLoopDistribution = 0_pInt
!debug_cumLpTicks = 0_pLongInt
!debug_cumDeltaStateTicks = 0_pLongInt
!debug_cumDotStateTicks = 0_pLongInt
!debug_cumLpCalls = 0_pInt
!debug_cumDeltaStateCalls = 0_pInt
!debug_cumDotStateCalls = 0_pInt
debug_stressMaxLocation = 0_pInt
debug_stressMinLocation = 0_pInt
debug_jacobianMaxLocation = 0_pInt
@ -325,123 +325,123 @@ end subroutine debug_reset
!> @brief writes debug statements to standard out
!--------------------------------------------------------------------------------------------------
subroutine debug_info
use numerics, only: &
nStress, &
nState, &
nCryst, &
nMPstate, &
nHomog
! use numerics, only: &
! nStress, &
! nState, &
! nCryst, &
! nMPstate, &
! nHomog
implicit none
integer(pInt) :: j,integral
integer(pLongInt) :: tickrate
!integer(pInt) :: j,integral
!integer(pLongInt) :: tickrate
character(len=1) :: exceed
call system_clock(count_rate=tickrate)
!call system_clock(count_rate=tickrate)
!$OMP CRITICAL (write2out)
debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then
write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)'
write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls
if (debug_cumLpCalls > 0_pInt) then
write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
real(debug_cumLpTicks,pReal)/real(tickrate,pReal)
write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal)
endif
write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls
if (debug_cumdotStateCalls > 0_pInt) then
write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal)
write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal)
endif
write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls
if (debug_cumDeltaStateCalls > 0_pInt) then
write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal)
write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal)
endif
!debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then
!write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)'
!write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls
!if (debug_cumLpCalls > 0_pInt) then
!write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
!real(debug_cumLpTicks,pReal)/real(tickrate,pReal)
!!write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
!real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal)
!endif
!write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls
!if (debug_cumdotStateCalls > 0_pInt) then
!write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
!real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal)
!write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
!real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal)
!endif
!write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls
!if (debug_cumDeltaStateCalls > 0_pInt) then
!write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
!real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal)
!write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
!real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal)
!endif
integral = 0_pInt
write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness'
do j=1_pInt,nStress+1_pInt
if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then
integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2))
exceed = ' '
if (j > nStress) exceed = '+' ! last entry gets "+"
write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),&
debug_StressLoopLpDistribution(j,2)
endif
enddo
write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), &
sum(debug_StressLoopLpDistribution(:,2))
!integral = 0_pInt
!write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness'
!do j=1_pInt,nStress+1_pInt
!if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then
!integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2))
!exceed = ' '
!if (j > nStress) exceed = '+' ! last entry gets "+"
!write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),&
!debug_StressLoopLpDistribution(j,2)
!endif
!enddo
!write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), &
!sum(debug_StressLoopLpDistribution(:,2))
integral = 0_pInt
write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness'
do j=1_pInt,nStress+1_pInt
if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then
integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2))
exceed = ' '
if (j > nStress) exceed = '+' ! last entry gets "+"
write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),&
debug_StressLoopLiDistribution(j,2)
endif
enddo
write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), &
sum(debug_StressLoopLiDistribution(:,2))
!integral = 0_pInt
!write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness'
!do j=1_pInt,nStress+1_pInt
!if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then
!integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2))
!exceed = ' '
!if (j > nStress) exceed = '+' ! last entry gets "+"
!write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),&
! debug_StressLoopLiDistribution(j,2)
!endif
!enddo
!write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), &
! sum(debug_StressLoopLiDistribution(:,2))
integral = 0_pInt
write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :'
do j=1_pInt,nState+1_pInt
if (any(debug_StateLoopDistribution(j,:) /= 0)) then
integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2))
exceed = ' '
if (j > nState) exceed = '+' ! last entry gets "+"
write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),&
debug_StateLoopDistribution(j,2)
endif
enddo
write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), &
sum(debug_StateLoopDistribution(:,2))
!integral = 0_pInt
!write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :'
!do j=1_pInt,nState+1_pInt
!if (any(debug_StateLoopDistribution(j,:) /= 0)) then
!integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2))
!exceed = ' '
!if (j > nState) exceed = '+' ! last entry gets "+"
!write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),&
! debug_StateLoopDistribution(j,2)
!endif
!enddo
!write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), &
! sum(debug_StateLoopDistribution(:,2))
integral = 0_pInt
write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :'
do j=1_pInt,nCryst+1_pInt
if (debug_CrystalliteLoopDistribution(j) /= 0) then
integral = integral + j*debug_CrystalliteLoopDistribution(j)
exceed = ' '
if (j > nCryst) exceed = '+'
write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j)
endif
enddo
write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution)
endif debugOutputCryst
!integral = 0_pInt
!write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :'
!do j=1_pInt,nCryst+1_pInt
!if (debug_CrystalliteLoopDistribution(j) /= 0) then
!integral = integral + j*debug_CrystalliteLoopDistribution(j)
!exceed = ' '
!if (j > nCryst) exceed = '+'
!write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j)
!endif
!enddo
!write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution)
!endif debugOutputCryst
debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then
integral = 0_pInt
write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :'
do j=1_pInt,nMPstate
if (debug_MaterialpointStateLoopDistribution(j) /= 0) then
integral = integral + j*debug_MaterialpointStateLoopDistribution(j)
write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j)
endif
enddo
write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution)
!debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then
!integral = 0_pInt
!write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :'
!do j=1_pInt,nMPstate
!if (debug_MaterialpointStateLoopDistribution(j) /= 0) then
!integral = integral + j*debug_MaterialpointStateLoopDistribution(j)
!!write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j)
!endif
!enddo
!write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution)
integral = 0_pInt
write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :'
do j=1_pInt,nHomog+1_pInt
if (debug_MaterialpointLoopDistribution(j) /= 0) then
integral = integral + j*debug_MaterialpointLoopDistribution(j)
exceed = ' '
if (j > nHomog) exceed = '+'
write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j)
endif
enddo
write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution)
endif debugOutputHomog
!integral = 0_pInt
!write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :'
!do j=1_pInt,nHomog+1_pInt
!if (debug_MaterialpointLoopDistribution(j) /= 0) then
! integral = integral + j*debug_MaterialpointLoopDistribution(j)
!exceed = ' '
!if (j > nHomog) exceed = '+'
!write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j)
!endif
!enddo
!write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution)
!endif debugOutputHomog
debugOutputCPFEM: if (iand(debug_level(debug_CPFEM),debug_LEVELBASIC) /= 0 &
.and. any(debug_stressMinLocation /= 0_pInt) &

View File

@ -545,9 +545,9 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
debug_levelExtensive, &
debug_levelSelective, &
debug_e, &
debug_i, &
debug_MaterialpointLoopDistribution, &
debug_MaterialpointStateLoopDistribution
debug_i!, &
!debug_MaterialpointLoopDistribution, &
!debug_MaterialpointStateLoopDistribution
implicit none
real(pReal), intent(in) :: dt !< time increment
@ -719,8 +719,8 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
elseif (materialpoint_requested(i,e)) then steppingNeeded ! already at final time (??)
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionHomog)
debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = &
debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1
!debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = &
!debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1
!$OMP END CRITICAL (distributionHomog)
endif
endif steppingNeeded
@ -865,8 +865,8 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
if (materialpoint_converged(i,e)) then
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionMPState)
debug_MaterialpointStateLoopdistribution(NiterationMPstate) = &
debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1_pInt
!debug_MaterialpointStateLoopdistribution(NiterationMPstate) = &
!debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1_pInt
!$OMP END CRITICAL (distributionMPState)
endif
endif