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

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.


Retired 12/31/2016

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

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.


Retired 12/31/2016

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya