Merge branch 'master' into reconnection
This commit is contained in:
commit
bbdee13e88
@ -134,6 +134,10 @@ program amun
|
|||||||
real(kind=8) :: tbeg = 0.0d+00, thrs
|
real(kind=8) :: tbeg = 0.0d+00, thrs
|
||||||
real(kind=8) :: tm_curr, tm_exec, tm_conv, tm_last = 0.0d+00
|
real(kind=8) :: tm_curr, tm_exec, tm_conv, tm_last = 0.0d+00
|
||||||
|
|
||||||
|
! vectors for better estimation of the remaining simulation time
|
||||||
|
!
|
||||||
|
real(kind=8), dimension(8) :: tprv, tm_prev
|
||||||
|
|
||||||
#ifndef __GFORTRAN__
|
#ifndef __GFORTRAN__
|
||||||
! the type of the function SIGNAL should be defined for Intel compiler
|
! the type of the function SIGNAL should be defined for Intel compiler
|
||||||
!
|
!
|
||||||
@ -590,6 +594,11 @@ program amun
|
|||||||
!
|
!
|
||||||
tbeg = time
|
tbeg = time
|
||||||
|
|
||||||
|
! initialize vectors for the remaining time estimation
|
||||||
|
!
|
||||||
|
tprv(:) = time
|
||||||
|
tm_prev(:) = get_timer_total()
|
||||||
|
|
||||||
! initialize estimated remaining time of calculations
|
! initialize estimated remaining time of calculations
|
||||||
!
|
!
|
||||||
ed = 9999
|
ed = 9999
|
||||||
@ -685,11 +694,20 @@ program amun
|
|||||||
! print progress info to console, but not too often
|
! print progress info to console, but not too often
|
||||||
!
|
!
|
||||||
if (master) then
|
if (master) then
|
||||||
|
|
||||||
|
! update vectors for the remaining time estimation
|
||||||
|
!
|
||||||
|
tm_prev(1) = tm_curr
|
||||||
|
tprv(1) = time
|
||||||
|
tm_prev = cshift(tm_prev, 1)
|
||||||
|
tprv = cshift(tprv , 1)
|
||||||
|
|
||||||
if (time >= tmax .or. (tm_curr - tm_last) >= 1.0d+00) then
|
if (time >= tmax .or. (tm_curr - tm_last) >= 1.0d+00) then
|
||||||
|
|
||||||
! calculate days, hours, seconds
|
! calculate days, hours, seconds
|
||||||
!
|
!
|
||||||
ec = int(tm_curr * (tmax - time) / max(1.0d-03, time - tbeg), kind = 4)
|
ec = int((tm_curr - tm_prev(1)) * (tmax - time) &
|
||||||
|
/ max(1.0d-03, time - tprv(1)), kind = 4)
|
||||||
es = max(0, min(863999999, ec))
|
es = max(0, min(863999999, ec))
|
||||||
ed = es / 86400
|
ed = es / 86400
|
||||||
es = es - 86400 * ed
|
es = es - 86400 * ed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user