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

Etime() wrapping

Keith_R_
Novice
929 Views
The timer in the development code I am working on uses the
call "ETIME()" to return the elapsed time. I am linking with -Vaxlib to obtain this from the portability library.

For times less than approximately 2000s it works fine and I get sensible results. However if the time exceeds this (2050s is the largest I have seen) the times are printed as:

++++++++++ and subsequently ?????????? using a F10.2 format.

Is there a wrap-round problem with this call? 2000s is suspiciously close to 2147s which would be the maximum value of a 32-bit integer timer measured in microseconds.

Secondly, what values would cause the I/O library to print the plusses and the question marks?

Keith Refson
0 Kudos
3 Replies
Steven_L_Intel1
Employee
929 Views
Well, I can solve part of the mystery... The output of +++++ means Infinity and ????? means NaN. I suspect this will change in the future.

There may be a code path inside ETIME that overflows, but I find this rather puzzling. I suggest submitting a problem report through the QuAD system (see Tech Support link above) and include a small program that demonstrates the problem.

Steve
0 Kudos
Keith_R_
Novice
929 Views
So of course when I try to write a stand-alone demo of the
problem it goes away. *sigh*.

I really *hate* the kind of problem that crops up only in
a large, complex code....

0 Kudos
Steven_L_Intel1
Employee
929 Views
I have to admit being puzzled as to how you're getting Infs and NaNs in your etime output - I suspect you have a data corrupter elsewhere in your program.

Steve
0 Kudos
Reply