Wiki page on basic timing with Fortran Intrinsics

Seeing some recent Tutorials appear here is inspirational. I’ll give a try at one …

Basic use of the Fortran intrinsics for timing comes up repeatedly. It is not as straight-forward as it first appears. So, gleaning information from several earlier posts I consolidated the information into a Wiki post; in a hope that an example will not only reduce the amount of re-inventing of the wheel but help others avoid the most common pitfalls. If you feel it needs changed or want to supplement it … well, its a Wiki post! Feel free to do so.

https://fortranwiki.org/fortran/show/Timing

If it stabilizes perhaps it can be posted on fortran-lang as a tutorial as well if warranted; but the Wiki is ideal for group editing.

8 Likes

I’ve done most of my timings in C++ where the use of std::chrono::high_resolution_clock is probs one of the best and the one that I’ve used the most. Reading from the std website (std::chrono::high_resolution_clock - cppreference.com) it seems that the native system clock in Fortran is the same as this. I wonder if based on some of your work here as a tutorial, a good wrapper can be created for timing and embed it into the fortran standard library. It would be very cool.

thanks for the tutorial! certainly very useful. Will go through it