fixed problem with gnu compiler: allocation of variables in constitutive_nonlocal_stateInit was not safe when not using any nonlocal constitution
put header of debugging output in constitutive_init at the start of the function in order to make debugging easier
This commit is contained in:
parent
7ad3ce62e7
commit
e4054c116d
|
@ -144,6 +144,10 @@ call constitutive_dislotwin_init(fileunit)
|
||||||
call constitutive_nonlocal_init(fileunit)
|
call constitutive_nonlocal_init(fileunit)
|
||||||
close(fileunit)
|
close(fileunit)
|
||||||
|
|
||||||
|
write(6,*)
|
||||||
|
write(6,*) '<<<+- constitutive init -+>>>'
|
||||||
|
write(6,*) '$Id$'
|
||||||
|
#include "compilation_info.f90"
|
||||||
|
|
||||||
! --- WRITE DESCRIPTION FILE FOR CONSTITUTIVE PHASE OUTPUT ---
|
! --- WRITE DESCRIPTION FILE FOR CONSTITUTIVE PHASE OUTPUT ---
|
||||||
|
|
||||||
|
@ -435,29 +439,23 @@ constitutive_maxSizeState = maxval(constitutive_sizeState)
|
||||||
constitutive_maxSizeDotState = maxval(constitutive_sizeDotState)
|
constitutive_maxSizeDotState = maxval(constitutive_sizeDotState)
|
||||||
constitutive_maxSizePostResults = maxval(constitutive_sizePostResults)
|
constitutive_maxSizePostResults = maxval(constitutive_sizePostResults)
|
||||||
|
|
||||||
!$OMP CRITICAL (write2out)
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_state0: ', shape(constitutive_state0)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_partionedState0: ', shape(constitutive_partionedState0)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_subState0: ', shape(constitutive_subState0)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_state: ', shape(constitutive_state)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_aTolState: ', shape(constitutive_aTolState)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_dotState: ', shape(constitutive_dotState)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_deltaState: ', shape(constitutive_deltaState)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_sizeState: ', shape(constitutive_sizeState)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_sizeDotState: ', shape(constitutive_sizeDotState)
|
||||||
|
write(6,'(a32,1x,7(i8,1x))') 'constitutive_sizePostResults: ', shape(constitutive_sizePostResults)
|
||||||
write(6,*)
|
write(6,*)
|
||||||
write(6,*) '<<<+- constitutive init -+>>>'
|
write(6,'(a32,1x,7(i8,1x))') 'maxSizeState: ', constitutive_maxSizeState
|
||||||
write(6,*) '$Id$'
|
write(6,'(a32,1x,7(i8,1x))') 'maxSizeDotState: ', constitutive_maxSizeDotState
|
||||||
#include "compilation_info.f90"
|
write(6,'(a32,1x,7(i8,1x))') 'maxSizePostResults: ', constitutive_maxSizePostResults
|
||||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then
|
endif
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_state0: ', shape(constitutive_state0)
|
call flush(6)
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_partionedState0: ', shape(constitutive_partionedState0)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_subState0: ', shape(constitutive_subState0)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_state: ', shape(constitutive_state)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_aTolState: ', shape(constitutive_aTolState)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_dotState: ', shape(constitutive_dotState)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_deltaState: ', shape(constitutive_deltaState)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_sizeState: ', shape(constitutive_sizeState)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_sizeDotState: ', shape(constitutive_sizeDotState)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'constitutive_sizePostResults: ', shape(constitutive_sizePostResults)
|
|
||||||
write(6,*)
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'maxSizeState: ', constitutive_maxSizeState
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'maxSizeDotState: ', constitutive_maxSizeDotState
|
|
||||||
write(6,'(a32,1x,7(i8,1x))') 'maxSizePostResults: ', constitutive_maxSizePostResults
|
|
||||||
endif
|
|
||||||
call flush(6)
|
|
||||||
!$OMP END CRITICAL (write2out)
|
|
||||||
|
|
||||||
end subroutine constitutive_init
|
end subroutine constitutive_init
|
||||||
|
|
||||||
|
|
|
@ -942,7 +942,7 @@ type(p_vec), dimension(1,mesh_maxNips,mesh_NcpElems), intent(inout) :: &
|
||||||
state ! microstructural state
|
state ! microstructural state
|
||||||
|
|
||||||
!*** local variables
|
!*** local variables
|
||||||
real(pReal), dimension(maxval(constitutive_nonlocal_totalNslip)) :: &
|
real(pReal), dimension(:), allocatable :: &
|
||||||
rhoSglEdgePos, & ! positive edge dislocation density
|
rhoSglEdgePos, & ! positive edge dislocation density
|
||||||
rhoSglEdgeNeg, & ! negative edge dislocation density
|
rhoSglEdgeNeg, & ! negative edge dislocation density
|
||||||
rhoSglScrewPos, & ! positive screw dislocation density
|
rhoSglScrewPos, & ! positive screw dislocation density
|
||||||
|
@ -971,6 +971,14 @@ real(pReal) meanDensity, &
|
||||||
|
|
||||||
maxNinstance = int(count(phase_plasticity == constitutive_nonlocal_label),pInt)
|
maxNinstance = int(count(phase_plasticity == constitutive_nonlocal_label),pInt)
|
||||||
|
|
||||||
|
if (maxNinstance > 0_pInt) then
|
||||||
|
allocate(rhoSglEdgePos(maxval(constitutive_nonlocal_totalNslip)))
|
||||||
|
allocate(rhoSglEdgeNeg(maxval(constitutive_nonlocal_totalNslip)))
|
||||||
|
allocate(rhoSglScrewPos(maxval(constitutive_nonlocal_totalNslip)))
|
||||||
|
allocate(rhoSglScrewNeg(maxval(constitutive_nonlocal_totalNslip)))
|
||||||
|
allocate(rhoDipEdge(maxval(constitutive_nonlocal_totalNslip)))
|
||||||
|
allocate(rhoDipScrew(maxval(constitutive_nonlocal_totalNslip)))
|
||||||
|
endif
|
||||||
do myInstance = 1_pInt,maxNinstance
|
do myInstance = 1_pInt,maxNinstance
|
||||||
ns = constitutive_nonlocal_totalNslip(myInstance)
|
ns = constitutive_nonlocal_totalNslip(myInstance)
|
||||||
|
|
||||||
|
@ -1045,6 +1053,15 @@ do myInstance = 1_pInt,maxNinstance
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
if (maxNinstance > 0_pInt) then
|
||||||
|
deallocate(rhoSglEdgePos)
|
||||||
|
deallocate(rhoSglEdgeNeg)
|
||||||
|
deallocate(rhoSglScrewPos)
|
||||||
|
deallocate(rhoSglScrewNeg)
|
||||||
|
deallocate(rhoDipEdge)
|
||||||
|
deallocate(rhoDipScrew)
|
||||||
|
endif
|
||||||
|
|
||||||
endsubroutine
|
endsubroutine
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue