- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use the function timef (module IFLPORT) to measure the elapsed time of my executable. I called it at the beginning and again at the end of the computations. In most cases the elapsed time is correct. However, sometimes I get a negativ elapsed time.
Any ideas what went wrong?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will hazard a guess that the variable you use for timef is a default real kind ( real(4) ) rather than real(8)....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The kind of behavior described in #1 happens if, as Andrew surmised, the value returned by the nonstandard extension TIMEF() is assigned to a single-precision real, AND the compiler is not told that TIMEF is of type DOUBLE PRECISION.
Either add USE IFPORT to your program unit that calls TIMEF(), or declare TIMEF as DOUBLE PRECISION in that unit.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page