Subsecond sleep

Jed Brown jed at 59A2.org
Sun Oct 18 16:50:37 CDT 2009


Barry Smith wrote:
> Likely, it had sleep() in there and a global search and replace wrongly
> turned it into a PetscSleep().

My docs for sleep(3) have:

RETURN VALUE
       Zero if the requested time has elapsed, or the number of seconds left to sleep, if the call was interrupted by a signal handler.

Presumably the AIX issue was that sleep() was returning without being
interrupted.  What are the desired semantics for PetscSleep(), I expect
it should return early if interrupted, like POSIX sleep()?  If sleep()
returns early even when not interrupted then I don't see a way for
PetscSleep() to return early if it is interrupted but to go for the full
time otherwise.

> The correct fix is to test properly under AIX, but since no one has AIX
> and it sucks it cannot be tested.

Excellent quote.


Jed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20091018/f03da2fc/attachment.sig>


More information about the petsc-dev mailing list