Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26734 Discussions

measure elapsed time with IFLPORT timef

Eva_L_
Beginner
107 Views

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?

 

 

0 Kudos
2 Replies
andrew_4619
Honored Contributor I
107 Views

I will hazard a guess that the variable you use for timef is a default real kind ( real(4) ) rather than real(8)....

mecej4
Black Belt
107 Views

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.

Reply