- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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....
problem it goes away. *sigh*.
I really *hate* the kind of problem that crops up only in
a large, complex code....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page