- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I do a google search on the terms "Fortran time program execution"
the interesting return shows the standard program in the AI section, which is nice, except for the implicit none loss.
program timing_example
real :: t1, t2
! Call CPU_TIME before the code section
call cpu_time(t1)
! *** Section of code to be timed goes here ***
! Example: a loop that does significant work
do i = 1, 100000000
! Some computation
end do
! ********************************************
! Call CPU_TIME after the code section
call cpu_time(t2)
print *, 'Time taken for code section: ', t2 - t1, ' seconds'
end program timing_example
but interestingly it shows the following
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page