Etime() wrapping

Etime() wrapping

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

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Steve Lionel (Intel)

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

Steve

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....

Bild des Benutzers Steve Lionel (Intel)

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

Steve

Melden Sie sich an, um einen Kommentar zu hinterlassen.