Subsecond sleep
Barry Smith
bsmith at mcs.anl.gov
Sun Oct 18 16:21:06 CDT 2009
On Oct 18, 2009, at 1:20 PM, Jed Brown wrote:
> Barry Smith wrote:
>>
>> It is fine with me to switch the infrastructure to use a PetscReal
>> instead of integer
>
> Done.
>
> http://petsc.cs.iit.edu/petsc/petsc-dev/rev/5704078f5057
>
>
> Did PetscSleep() once return the time remaining instead of an error
> code? The following can't possibly have worked correctly for a while.
> Should it be fixed or removed?
Likely, it had sleep() in there and a global search and replace
wrongly turned it into a PetscSleep().
The correct fix is to test properly under AIX, but since no one has
AIX and it sucks it cannot be tested.
Barry
>
> /*
> IBM sleep may return at anytime, hence must see if there is
> more time to sleep
> */
> {
> int left = sleeptime;
> while (left > 0) {left = PetscSleep(left) - 1;}
> }
>
>
>
> Jed
>
More information about the petsc-dev
mailing list