Skip to content

Commit 6790d65

Browse files
authored
Merge pull request #577 from feathern/timing_fix
Timing Bug Fix
2 parents ad02113 + 0fb233d commit 6790d65

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Physics/Sphere_Driver.F90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ End Subroutine Initialize_TimeStepping
7272
Subroutine Main_Loop_Sphere()
7373
Implicit None
7474
Integer :: last_iteration, first_iteration, i, iret
75-
Integer :: io=15, ierr
75+
Integer :: io=15, ierr, iteration_count
7676
Real*8 :: captured_time, max_time_seconds
7777
Logical :: terminate_file_exists
7878
Character*14 :: tmstr
@@ -310,15 +310,16 @@ Subroutine Main_Loop_Sphere()
310310
Write(tmstr,fmtstr)captured_time
311311
Call stdout%print('captured time: '//tmstr)
312312

313-
Write(tmstr,fmtstr)(last_iteration-first_iteration)/StopWatch(loop_time)%elapsed
313+
iteration_count = last_iteration-first_iteration
314+
Write(tmstr,fmtstr)(iteration_count)/StopWatch(loop_time)%elapsed
314315
Call stdout%print(' ')
315316
Call stdout%print(' iter/sec: '//tmstr)
316317

317318
Call stdout%print('//////////////////////////////////////////////')
318319

319320

320321
Endif
321-
Call Finalize_Timing(n_r,l_max,max_iterations)
322+
Call Finalize_Timing(n_r,l_max,iteration_count)
322323
End Subroutine Main_Loop_Sphere
323324

324325
! Signal handler function

0 commit comments

Comments
 (0)