use print instead of write
https://www.scivision.dev/print-vs-write-fortran/
This commit is contained in:
parent
7d929122af
commit
b497ec4371
|
@ -87,20 +87,20 @@ subroutine DAMASK_interface_init
|
|||
|
||||
! http://patorjk.com/software/taag/#p=display&f=Lean&t=DAMASK%203
|
||||
#ifdef DEBUG
|
||||
write(6,*) achar(27)//'[31m'
|
||||
print*, achar(27)//'[31m'
|
||||
write(6,'(a,/)') ' debug version - debug version - debug version - debug version - debug version'
|
||||
#else
|
||||
write(6,*) achar(27)//'[94m'
|
||||
print*, achar(27)//'[94m'
|
||||
#endif
|
||||
write(6,*) ' _/_/_/ _/_/ _/ _/ _/_/ _/_/_/ _/ _/ _/_/_/'
|
||||
write(6,*) ' _/ _/ _/ _/ _/_/ _/_/ _/ _/ _/ _/ _/ _/'
|
||||
write(6,*) ' _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/_/ _/_/ _/_/ _/_/'
|
||||
write(6,*) ' _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/'
|
||||
write(6,*) ' _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/_/_/'
|
||||
print*, ' _/_/_/ _/_/ _/ _/ _/_/ _/_/_/ _/ _/ _/_/_/'
|
||||
print*, ' _/ _/ _/ _/ _/_/ _/_/ _/ _/ _/ _/ _/ _/'
|
||||
print*, ' _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/_/ _/_/ _/_/ _/_/'
|
||||
print*, ' _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/'
|
||||
print*, ' _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/_/_/'
|
||||
#ifdef DEBUG
|
||||
write(6,'(/,a)') ' debug version - debug version - debug version - debug version - debug version'
|
||||
#endif
|
||||
write(6,*) achar(27)//'[0m'
|
||||
print*, achar(27)//'[0m'
|
||||
|
||||
write(6,'(a)') ' Roters et al., Computational Materials Science 158:420–478, 2019'
|
||||
write(6,'(a)') ' https://doi.org/10.1016/j.commatsci.2018.04.030'
|
||||
|
|
|
@ -59,7 +59,7 @@ subroutine parse_material
|
|||
inquire(file=fname,exist=fileExists)
|
||||
if(.not. fileExists) call IO_error(100,ext_msg=fname)
|
||||
endif
|
||||
write(6,*) 'reading '//fname; flush(6)
|
||||
print*, 'reading '//fname; flush(6)
|
||||
config_material => YAML_parse_file(fname)
|
||||
|
||||
end subroutine parse_material
|
||||
|
@ -76,7 +76,7 @@ subroutine parse_numerics
|
|||
config_numerics => emptyDict
|
||||
inquire(file='numerics.yaml', exist=fexist)
|
||||
if (fexist) then
|
||||
write(6,*) 'reading numerics.yaml'; flush(6)
|
||||
print*, 'reading numerics.yaml'; flush(6)
|
||||
config_numerics => YAML_parse_file('numerics.yaml')
|
||||
endif
|
||||
|
||||
|
@ -93,7 +93,7 @@ subroutine parse_debug
|
|||
config_debug => emptyDict
|
||||
inquire(file='debug.yaml', exist=fexist)
|
||||
fileExists: if (fexist) then
|
||||
write(6,*) 'reading debug.yaml'; flush(6)
|
||||
print*, 'reading debug.yaml'; flush(6)
|
||||
config_debug => YAML_parse_file('debug.yaml')
|
||||
endif fileExists
|
||||
|
||||
|
|
|
@ -924,14 +924,14 @@ subroutine tElement_init(self,elemType)
|
|||
|
||||
write(6,'(/,a)') ' <<<+- element_init -+>>>'; flush(6)
|
||||
|
||||
write(6,*) ' element type: ',self%elemType
|
||||
write(6,*) ' geom type: ',self%geomType
|
||||
write(6,*) ' cell type: ',self%cellType
|
||||
write(6,*) ' # node: ',self%Nnodes
|
||||
write(6,*) ' # IP: ',self%nIPs
|
||||
write(6,*) ' # cellnode: ',self%Ncellnodes
|
||||
write(6,*) ' # cellnode/cell: ',self%NcellnodesPerCell
|
||||
write(6,*) ' # IP neighbor: ',self%nIPneighbors
|
||||
print*, 'element type: ',self%elemType
|
||||
print*, ' geom type: ',self%geomType
|
||||
print*, ' cell type: ',self%cellType
|
||||
print*, ' # node: ',self%Nnodes
|
||||
print*, ' # IP: ',self%nIPs
|
||||
print*, ' # cellnode: ',self%Ncellnodes
|
||||
print*, ' # cellnode/cell: ',self%NcellnodesPerCell
|
||||
print*, ' # IP neighbor: ',self%nIPneighbors
|
||||
|
||||
end subroutine tElement_init
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ module subroutine mech_RGC_partitionDeformation(F,avgF,instance,of)
|
|||
do i = 1,3
|
||||
write(6,'(1x,3(e15.8,1x))')(F(i,j,iGrain), j = 1,3)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -307,7 +307,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,size(stt%relaxationVector(:,of))
|
||||
write(6,'(1x,2(e15.8,1x))') stt%relaxationVector(i,of)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
@ -330,7 +330,7 @@ module procedure mech_RGC_updateState
|
|||
(R(i,j,iGrain), j = 1,3), &
|
||||
(D(i,j,iGrain), j = 1,3)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
enddo
|
||||
endif
|
||||
#endif
|
||||
|
@ -371,7 +371,7 @@ module procedure mech_RGC_updateState
|
|||
if (debugHomog%extensive) then
|
||||
write(6,'(1x,a30,1x,i3)')'Traction at interface: ',iNum
|
||||
write(6,'(1x,3(e15.8,1x))')(tract(iNum,j), j = 1,3)
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
endif
|
||||
#endif
|
||||
enddo
|
||||
|
@ -513,7 +513,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,3*nIntFaceTot
|
||||
write(6,'(1x,100(e11.4,1x))')(smatrix(i,j), j = 1,3*nIntFaceTot)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -573,7 +573,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,3*nIntFaceTot
|
||||
write(6,'(1x,100(e11.4,1x))')(pmatrix(i,j), j = 1,3*nIntFaceTot)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -592,7 +592,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,3*nIntFaceTot
|
||||
write(6,'(1x,100(e11.4,1x))')(rmatrix(i,j), j = 1,3*nIntFaceTot)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -607,7 +607,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,3*nIntFaceTot
|
||||
write(6,'(1x,100(e11.4,1x))')(jmatrix(i,j), j = 1,3*nIntFaceTot)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -623,7 +623,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,3*nIntFaceTot
|
||||
write(6,'(1x,100(e11.4,1x))')(jnverse(i,j), j = 1,3*nIntFaceTot)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -650,7 +650,7 @@ module procedure mech_RGC_updateState
|
|||
do i = 1,size(stt%relaxationVector(:,of))
|
||||
write(6,'(1x,2(e15.8,1x))') stt%relaxationVector(i,of)
|
||||
enddo
|
||||
write(6,*)' '
|
||||
print*,' '
|
||||
flush(6)
|
||||
endif
|
||||
#endif
|
||||
|
@ -699,7 +699,7 @@ module procedure mech_RGC_updateState
|
|||
|
||||
if (debugActive) then
|
||||
write(6,'(1x,a20,2(1x,i3))')'Correction factor: ',ip,el
|
||||
write(6,*) surfCorr
|
||||
print*, surfCorr
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
@ -740,7 +740,7 @@ module procedure mech_RGC_updateState
|
|||
#ifdef DEBUG
|
||||
if (debugActive) then
|
||||
write(6,'(1x,a20,i2,1x,a20,1x,i3)')'Mismatch to face: ',intFace(1),'neighbor grain: ',iGNghb
|
||||
write(6,*) transpose(nDef)
|
||||
print*, transpose(nDef)
|
||||
write(6,'(1x,a20,e11.4)')'with magnitude: ',nDefNorm
|
||||
endif
|
||||
#endif
|
||||
|
@ -758,7 +758,7 @@ module procedure mech_RGC_updateState
|
|||
#ifdef DEBUG
|
||||
if (debugActive) then
|
||||
write(6,'(1x,a20,i2)')'Penalty of grain: ',iGrain
|
||||
write(6,*) transpose(rPen(1:3,1:3,iGrain))
|
||||
print*, transpose(rPen(1:3,1:3,iGrain))
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
@ -808,7 +808,7 @@ module procedure mech_RGC_updateState
|
|||
if (debugHomog%extensive &
|
||||
.and. param(instance)%of_debug == of) then
|
||||
write(6,'(1x,a30,i2)')'Volume penalty of grain: ',i
|
||||
write(6,*) transpose(vPen(:,:,i))
|
||||
print*, transpose(vPen(:,:,i))
|
||||
endif
|
||||
#endif
|
||||
enddo
|
||||
|
|
|
@ -79,12 +79,12 @@ subroutine parallelization_init
|
|||
|
||||
!$ call get_environment_variable(name='DAMASK_NUM_THREADS',value=NumThreadsString,STATUS=got_env)
|
||||
!$ if(got_env /= 0) then
|
||||
!$ write(6,*) 'Could not determine value of $DAMASK_NUM_THREADS'
|
||||
!$ print*, 'Could not determine value of $DAMASK_NUM_THREADS'
|
||||
!$ DAMASK_NUM_THREADS = 1_pI32
|
||||
!$ else
|
||||
!$ read(NumThreadsString,'(i6)') DAMASK_NUM_THREADS
|
||||
!$ if (DAMASK_NUM_THREADS < 1_pI32) then
|
||||
!$ write(6,*) 'Invalid DAMASK_NUM_THREADS: '//trim(NumThreadsString)
|
||||
!$ print*, 'Invalid DAMASK_NUM_THREADS: '//trim(NumThreadsString)
|
||||
!$ DAMASK_NUM_THREADS = 1_pI32
|
||||
!$ endif
|
||||
!$ endif
|
||||
|
|
Loading…
Reference in New Issue