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

View File

@ -529,8 +529,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
debug_levelSelective, & debug_levelSelective, &
debug_e, & debug_e, &
debug_i, & debug_i, &
debug_g, & debug_g!, &
debug_CrystalliteLoopDistribution !debug_CrystalliteLoopDistribution
use IO, only: & use IO, only: &
IO_warning, & IO_warning, &
IO_error IO_error
@ -949,8 +949,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt & if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt &
.and. formerSubStep > 0.0_pReal) then .and. formerSubStep > 0.0_pReal) then
!$OMP CRITICAL (distributionCrystallite) !$OMP CRITICAL (distributionCrystallite)
debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = & !debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = &
debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt !debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt
!$OMP END CRITICAL (distributionCrystallite) !$OMP END CRITICAL (distributionCrystallite)
endif endif
endif endif
@ -1259,8 +1259,8 @@ subroutine crystallite_integrateStateRK4()
debug_crystallite, & debug_crystallite, &
debug_levelBasic, & debug_levelBasic, &
debug_levelExtensive, & debug_levelExtensive, &
debug_levelSelective, & debug_levelSelective !, &
debug_StateLoopDistribution !debug_StateLoopDistribution
use FEsolving, only: & use FEsolving, only: &
FEsolving_execElem, & FEsolving_execElem, &
FEsolving_execIP FEsolving_execIP
@ -1519,8 +1519,8 @@ subroutine crystallite_integrateStateRK4()
crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem 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 if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState) !$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(4,numerics_integrationMode) = & !debug_StateLoopDistribution(4,numerics_integrationMode) = &
debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt !debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState) !$OMP END CRITICAL (distributionState)
endif endif
endif endif
@ -1555,8 +1555,8 @@ subroutine crystallite_integrateStateRKCK45()
debug_crystallite, & debug_crystallite, &
debug_levelBasic, & debug_levelBasic, &
debug_levelExtensive, & debug_levelExtensive, &
debug_levelSelective, & debug_levelSelective!, &
debug_StateLoopDistribution !debug_StateLoopDistribution
use numerics, only: & use numerics, only: &
rTol_crystalliteState, & rTol_crystalliteState, &
numerics_integrationMode numerics_integrationMode
@ -2023,8 +2023,8 @@ subroutine crystallite_integrateStateRKCK45()
crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definition 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 if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState) !$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(6,numerics_integrationMode) = & !debug_StateLoopDistribution(6,numerics_integrationMode) = &
debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt !debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState) !$OMP END CRITICAL (distributionState)
endif endif
endif endif
@ -2060,8 +2060,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
debug_crystallite, & debug_crystallite, &
debug_levelBasic, & debug_levelBasic, &
debug_levelExtensive, & debug_levelExtensive, &
debug_levelSelective, & debug_levelSelective!, &
debug_StateLoopDistribution !debug_StateLoopDistribution
use numerics, only: & use numerics, only: &
rTol_crystalliteState, & rTol_crystalliteState, &
numerics_integrationMode numerics_integrationMode
@ -2365,8 +2365,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
crystallite_converged(g,i,e) = .true. ! ... converged per definitionem crystallite_converged(g,i,e) = .true. ! ... converged per definitionem
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState) !$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(2,numerics_integrationMode) = & !debug_StateLoopDistribution(2,numerics_integrationMode) = &
debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt !debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState) !$OMP END CRITICAL (distributionState)
endif endif
endif endif
@ -2383,8 +2383,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
crystallite_converged(g,i,e) = .true. ! ... converged per definitionem crystallite_converged(g,i,e) = .true. ! ... converged per definitionem
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState) !$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(2,numerics_integrationMode) = & !debug_StateLoopDistribution(2,numerics_integrationMode) = &
debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt !debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState) !$OMP END CRITICAL (distributionState)
endif endif
endif endif
@ -2422,8 +2422,8 @@ subroutine crystallite_integrateStateEuler()
debug_crystallite, & debug_crystallite, &
debug_levelBasic, & debug_levelBasic, &
debug_levelExtensive, & debug_levelExtensive, &
debug_levelSelective, & debug_levelSelective!, &
debug_StateLoopDistribution !debug_StateLoopDistribution
use numerics, only: & use numerics, only: &
numerics_integrationMode, & numerics_integrationMode, &
numerics_timeSyncing 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 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 if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState) !$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(1,numerics_integrationMode) = & !debug_StateLoopDistribution(1,numerics_integrationMode) = &
debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt !debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState) !$OMP END CRITICAL (distributionState)
endif endif
endif endif
@ -2647,8 +2647,8 @@ subroutine crystallite_integrateStateFPI()
debug_crystallite, & debug_crystallite, &
debug_levelBasic, & debug_levelBasic, &
debug_levelExtensive, & debug_levelExtensive, &
debug_levelSelective, & debug_levelSelective!, &
debug_StateLoopDistribution !debug_StateLoopDistribution
use numerics, only: & use numerics, only: &
nState, & nState, &
numerics_integrationMode, & numerics_integrationMode, &
@ -3025,8 +3025,8 @@ subroutine crystallite_integrateStateFPI()
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionState) !$OMP CRITICAL (distributionState)
debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = & !debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = &
debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt !debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionState) !$OMP END CRITICAL (distributionState)
endif endif
endif endif
@ -3246,12 +3246,12 @@ logical function crystallite_integrateStress(&
#ifdef DEBUG #ifdef DEBUG
debug_e, & debug_e, &
debug_i, & debug_i, &
debug_g, & debug_g!, &
#endif #endif
debug_cumLpCalls, & !debug_cumLpCalls, &
debug_cumLpTicks, & !debug_cumLpTicks, &
debug_StressLoopLpDistribution, & !debug_StressLoopLpDistribution, &
debug_StressLoopLiDistribution !debug_StressLoopLiDistribution
use constitutive, only: constitutive_LpAndItsTangent, & use constitutive, only: constitutive_LpAndItsTangent, &
constitutive_LiAndItsTangent, & constitutive_LiAndItsTangent, &
constitutive_TandItsTangent constitutive_TandItsTangent
@ -3353,7 +3353,7 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt & if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt &
.and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) & .and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) &
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) & .or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) &
write(6,'(a,i8,1x,i2,1x,i3)') '<< CRYST >> integrateStress at el ip ipc ',el,ip,ipc write(6,'(a,i8,1x,i2,1x,i3)') '<< CRYST >> integrateStress at el ip ipc ',el,ip,ipc
#endif #endif
!* only integrate over fraction of timestep? !* only integrate over fraction of timestep?
@ -3477,10 +3477,10 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
!$OMP CRITICAL (debugTimingLpTangent) !$OMP CRITICAL (debugTimingLpTangent)
debug_cumLpCalls = debug_cumLpCalls + 1_pInt !debug_cumLpCalls = debug_cumLpCalls + 1_pInt
debug_cumLpTicks = debug_cumLpTicks + tock-tick !debug_cumLpTicks = debug_cumLpTicks + tock-tick
!$OMP FLUSH (debug_cumLpTicks) !$OMP FLUSH (debug_cumLpTicks)
if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks !if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks
!$OMP END CRITICAL (debugTimingLpTangent) !$OMP END CRITICAL (debugTimingLpTangent)
endif endif
@ -3583,8 +3583,8 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionStress) !$OMP CRITICAL (distributionStress)
debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = & !debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = &
debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt !debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionStress) !$OMP END CRITICAL (distributionStress)
endif endif
@ -3670,8 +3670,8 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionStress) !$OMP CRITICAL (distributionStress)
debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = & !debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = &
debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt !debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt
!$OMP END CRITICAL (distributionStress) !$OMP END CRITICAL (distributionStress)
endif 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" integer(pInt),protected, dimension(debug_maxNtype+2_pInt), public :: & ! specific ones, and 2 for "all" and "other"
debug_level = 0_pInt debug_level = 0_pInt
integer(pLongInt), public :: & !integer(pLongInt), public :: &
debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent !debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent
debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState !debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState
debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState !debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState
integer(pInt), protected, public :: & integer(pInt), protected, public :: &
debug_e = 1_pInt, & debug_e = 1_pInt, &
debug_i = 1_pInt, & debug_i = 1_pInt, &
debug_g = 1_pInt debug_g = 1_pInt
integer(pLongInt), public :: & !integer(pLongInt), public :: &
debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent !debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent
debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState !debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState
debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState !debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState
integer(pInt), dimension(2), public :: & integer(pInt), dimension(2), public :: &
debug_stressMaxLocation = 0_pInt, & debug_stressMaxLocation = 0_pInt, &
@ -68,15 +68,15 @@ module debug
debug_jacobianMinLocation = 0_pInt debug_jacobianMinLocation = 0_pInt
integer(pInt), dimension(:), allocatable, public :: & !integer(pInt), dimension(:), allocatable, public :: &
debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks !debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks
debug_MaterialpointStateLoopDistribution, & !debug_MaterialpointStateLoopDistribution, &
debug_MaterialpointLoopDistribution !debug_MaterialpointLoopDistribution
integer(pInt), dimension(:,:), allocatable, public :: & !integer(pInt), dimension(:,:), allocatable, public :: &
debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence !debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence
debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence !debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence
debug_StateLoopDistribution !< distribution of state iterations until convergence !debug_StateLoopDistribution !< distribution of state iterations until convergence
real(pReal), public :: & real(pReal), public :: &
debug_stressMax = -huge(1.0_pReal), & debug_stressMax = -huge(1.0_pReal), &
@ -107,12 +107,12 @@ subroutine debug_init
compiler_version, & compiler_version, &
compiler_options compiler_options
#endif #endif
use numerics, only: & ! use numerics, only: &
nStress, & ! nStress, &
nState, & ! nState, &
nCryst, & ! nCryst, &
nMPstate, & ! nMPstate, &
nHomog ! nHomog
use IO, only: & use IO, only: &
IO_read, & IO_read, &
IO_error, & IO_error, &
@ -137,12 +137,12 @@ subroutine debug_init
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt) !allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt)
allocate(debug_StressLoopLiDistribution(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_StateLoopDistribution(nState+1,2), source=0_pInt)
allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt) !allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt)
allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt) !allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt)
allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt) !allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! try to open the config file ! try to open the config file
@ -297,18 +297,18 @@ subroutine debug_reset
implicit none implicit none
debug_StressLoopLpDistribution = 0_pInt !debug_StressLoopLpDistribution = 0_pInt
debug_StressLoopLiDistribution = 0_pInt !debug_StressLoopLiDistribution = 0_pInt
debug_StateLoopDistribution = 0_pInt !debug_StateLoopDistribution = 0_pInt
debug_CrystalliteLoopDistribution = 0_pInt !debug_CrystalliteLoopDistribution = 0_pInt
debug_MaterialpointStateLoopDistribution = 0_pInt !debug_MaterialpointStateLoopDistribution = 0_pInt
debug_MaterialpointLoopDistribution = 0_pInt !debug_MaterialpointLoopDistribution = 0_pInt
debug_cumLpTicks = 0_pLongInt !debug_cumLpTicks = 0_pLongInt
debug_cumDeltaStateTicks = 0_pLongInt !debug_cumDeltaStateTicks = 0_pLongInt
debug_cumDotStateTicks = 0_pLongInt !debug_cumDotStateTicks = 0_pLongInt
debug_cumLpCalls = 0_pInt !debug_cumLpCalls = 0_pInt
debug_cumDeltaStateCalls = 0_pInt !debug_cumDeltaStateCalls = 0_pInt
debug_cumDotStateCalls = 0_pInt !debug_cumDotStateCalls = 0_pInt
debug_stressMaxLocation = 0_pInt debug_stressMaxLocation = 0_pInt
debug_stressMinLocation = 0_pInt debug_stressMinLocation = 0_pInt
debug_jacobianMaxLocation = 0_pInt debug_jacobianMaxLocation = 0_pInt
@ -325,123 +325,123 @@ end subroutine debug_reset
!> @brief writes debug statements to standard out !> @brief writes debug statements to standard out
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine debug_info subroutine debug_info
use numerics, only: & ! use numerics, only: &
nStress, & ! nStress, &
nState, & ! nState, &
nCryst, & ! nCryst, &
nMPstate, & ! nMPstate, &
nHomog ! nHomog
implicit none implicit none
integer(pInt) :: j,integral !integer(pInt) :: j,integral
integer(pLongInt) :: tickrate !integer(pLongInt) :: tickrate
character(len=1) :: exceed character(len=1) :: exceed
call system_clock(count_rate=tickrate) !call system_clock(count_rate=tickrate)
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then !debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then
write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)' !write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)'
write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls !write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls
if (debug_cumLpCalls > 0_pInt) then !if (debug_cumLpCalls > 0_pInt) then
write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
real(debug_cumLpTicks,pReal)/real(tickrate,pReal) !real(debug_cumLpTicks,pReal)/real(tickrate,pReal)
write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& !!write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal) !real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal)
endif !endif
write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls !write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls
if (debug_cumdotStateCalls > 0_pInt) then !if (debug_cumdotStateCalls > 0_pInt) then
write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal) !real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal)
write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& !write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal) !real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal)
endif !endif
write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls !write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls
if (debug_cumDeltaStateCalls > 0_pInt) then !if (debug_cumDeltaStateCalls > 0_pInt) then
write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',&
real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal) !real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal)
write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& !write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',&
real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal) !real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal)
endif !endif
integral = 0_pInt !integral = 0_pInt
write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness' !write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness'
do j=1_pInt,nStress+1_pInt !do j=1_pInt,nStress+1_pInt
if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then !if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then
integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2)) !integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2))
exceed = ' ' !exceed = ' '
if (j > nStress) exceed = '+' ! last entry gets "+" !if (j > nStress) exceed = '+' ! last entry gets "+"
write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),& !write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),&
debug_StressLoopLpDistribution(j,2) !debug_StressLoopLpDistribution(j,2)
endif !endif
enddo !enddo
write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), & !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), &
sum(debug_StressLoopLpDistribution(:,2)) !sum(debug_StressLoopLpDistribution(:,2))
integral = 0_pInt !integral = 0_pInt
write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness' !write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness'
do j=1_pInt,nStress+1_pInt !do j=1_pInt,nStress+1_pInt
if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then !if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then
integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2)) !integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2))
exceed = ' ' !exceed = ' '
if (j > nStress) exceed = '+' ! last entry gets "+" !if (j > nStress) exceed = '+' ! last entry gets "+"
write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),& !write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),&
debug_StressLoopLiDistribution(j,2) ! debug_StressLoopLiDistribution(j,2)
endif !endif
enddo !enddo
write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), & !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), &
sum(debug_StressLoopLiDistribution(:,2)) ! sum(debug_StressLoopLiDistribution(:,2))
integral = 0_pInt !integral = 0_pInt
write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :' !write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :'
do j=1_pInt,nState+1_pInt !do j=1_pInt,nState+1_pInt
if (any(debug_StateLoopDistribution(j,:) /= 0)) then !if (any(debug_StateLoopDistribution(j,:) /= 0)) then
integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2)) !integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2))
exceed = ' ' !exceed = ' '
if (j > nState) exceed = '+' ! last entry gets "+" !if (j > nState) exceed = '+' ! last entry gets "+"
write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),& !write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),&
debug_StateLoopDistribution(j,2) ! debug_StateLoopDistribution(j,2)
endif !endif
enddo !enddo
write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), & !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), &
sum(debug_StateLoopDistribution(:,2)) ! sum(debug_StateLoopDistribution(:,2))
integral = 0_pInt !integral = 0_pInt
write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :' !write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :'
do j=1_pInt,nCryst+1_pInt !do j=1_pInt,nCryst+1_pInt
if (debug_CrystalliteLoopDistribution(j) /= 0) then !if (debug_CrystalliteLoopDistribution(j) /= 0) then
integral = integral + j*debug_CrystalliteLoopDistribution(j) !integral = integral + j*debug_CrystalliteLoopDistribution(j)
exceed = ' ' !exceed = ' '
if (j > nCryst) exceed = '+' !if (j > nCryst) exceed = '+'
write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j) !write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j)
endif !endif
enddo !enddo
write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution) !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution)
endif debugOutputCryst !endif debugOutputCryst
debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then !debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then
integral = 0_pInt !integral = 0_pInt
write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :' !write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :'
do j=1_pInt,nMPstate !do j=1_pInt,nMPstate
if (debug_MaterialpointStateLoopDistribution(j) /= 0) then !if (debug_MaterialpointStateLoopDistribution(j) /= 0) then
integral = integral + j*debug_MaterialpointStateLoopDistribution(j) !integral = integral + j*debug_MaterialpointStateLoopDistribution(j)
write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j) !!write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j)
endif !endif
enddo !enddo
write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution) !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution)
integral = 0_pInt !integral = 0_pInt
write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :' !write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :'
do j=1_pInt,nHomog+1_pInt !do j=1_pInt,nHomog+1_pInt
if (debug_MaterialpointLoopDistribution(j) /= 0) then !if (debug_MaterialpointLoopDistribution(j) /= 0) then
integral = integral + j*debug_MaterialpointLoopDistribution(j) ! integral = integral + j*debug_MaterialpointLoopDistribution(j)
exceed = ' ' !exceed = ' '
if (j > nHomog) exceed = '+' !if (j > nHomog) exceed = '+'
write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j) !write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j)
endif !endif
enddo !enddo
write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution) !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution)
endif debugOutputHomog !endif debugOutputHomog
debugOutputCPFEM: if (iand(debug_level(debug_CPFEM),debug_LEVELBASIC) /= 0 & debugOutputCPFEM: if (iand(debug_level(debug_CPFEM),debug_LEVELBASIC) /= 0 &
.and. any(debug_stressMinLocation /= 0_pInt) & .and. any(debug_stressMinLocation /= 0_pInt) &

View File

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