DRIVER, IO: Make sure thrs is set before using it.
Variable thrs was used before it was calculated for the first time. This patch fixes it. Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
70a0b137b6
commit
9ae7ef065b
@ -559,6 +559,14 @@ program amun
|
||||
step = step + 1
|
||||
nsteps = nsteps + 1
|
||||
|
||||
! get current time in seconds
|
||||
!
|
||||
tm_curr = get_timer_total()
|
||||
|
||||
! compute elapsed time
|
||||
!
|
||||
thrs = tm_curr / 3.6d+03
|
||||
|
||||
! store mesh statistics
|
||||
!
|
||||
call store_mesh_stats(step, time)
|
||||
@ -575,14 +583,6 @@ program amun
|
||||
!
|
||||
call write_snapshot()
|
||||
|
||||
! get current time in seconds
|
||||
!
|
||||
tm_curr = get_timer_total()
|
||||
|
||||
! compute elapsed time
|
||||
!
|
||||
thrs = tm_curr / 3.6d+03
|
||||
|
||||
! check if the time exceeds execution time limit
|
||||
!
|
||||
if (thrs > trun) iterm = 100
|
||||
|
@ -117,9 +117,9 @@ module io
|
||||
integer(kind=4) , save :: irest = 1
|
||||
integer(kind=4) , save :: isnap = 0
|
||||
integer(kind=4) , save :: ishift = 0
|
||||
real(kind=8) , save :: hrest = 6.0e+00
|
||||
real(kind=8) , save :: hsnap = 1.0e+00
|
||||
real(kind=8) , save :: tsnap = 0.0e+00
|
||||
real(kind=8) , save :: hrest = 6.0d+00
|
||||
real(kind=8) , save :: hsnap = 1.0d+00
|
||||
real(kind=8) , save :: tsnap = 0.0d+00
|
||||
|
||||
! flags to determine the way of data writing
|
||||
!
|
||||
@ -382,7 +382,7 @@ module io
|
||||
!
|
||||
! check if conditions for storing the restart snapshot have been met
|
||||
!
|
||||
if (hrest < 5.0e-02 .or. thrs < irest * hrest) return
|
||||
if (hrest < 5.0d-02 .or. thrs < irest * hrest) return
|
||||
|
||||
#ifdef PROFILE
|
||||
! start accounting time for the data writing
|
||||
|
Loading…
x
Reference in New Issue
Block a user