Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

timef() - typing woes

mkbane
Beginner
396 Views
I thought timef() was meant to be declared as REAL(4) but when I run an example with this typing on a Nehalem machine it returns zero on every call (changing to DOUBLE PRECISION I do get the expected results)
0 Kudos
2 Replies
Steven_L_Intel1
Employee
396 Views
The manual is wrong - REAL(8) is the correct type. Or, add USE IFPORT. I'll let the writers know.
0 Kudos
Ron_Green
Moderator
396 Views
The manual is wrong - REAL(8) is the correct type. Or, add USE IFPORT. I'll let the writers know.

Yes, it's interesting that they got the example correct in the docs for TIMEF:

USE IFPORT

INTEGER i, j

REAL(8) elapsed_time

elapsed_time = TIMEF( )

DO i = 1, 1000000000

j = j + 1

END DO

elapsed_time = TIMEF( )

PRINT *, elapsed_time

END

0 Kudos
Reply