New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the timeout option is not working correctly in parallel computing #11658
Comments
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to sleep time-out |
comment:2
Is this really an issue? I guess the timeout simply sets a |
comment:3
P.S.: If you use Depending on the selection / order of arguments, you may well get timeouts for [perhaps only some of] the child processes (i.e. they'll get killed), though not after the time you'd expect. The behaviour is non-deterministic though, for whatever reason. (Try running the |
comment:4
Oh, this is a more funny one (and not due to what I first guessed). Looking at the code, it does spawn if timeout:
def mysig(a,b):
raise RuntimeError, "SIGALRM"
oldest = min([X[1] for X in workers.values()])
signal.signal(signal.SIGALRM, mysig)
signal.alarm(int(walltime() - oldest)+1) ( This code is executed repeatedly; if |
Sage library patch. Corrects time to wait for child processes (before they get killed) in the parallel fork decorator. Based on Sage 4.7.1.rc0. |
comment:5
Attachment: trac_11658-fix_timeout_in_parallel_decorator.sagelib.patch.gz A trivial patch is up. |
Author: Leif Leonhardy |
comment:6
Yes its definitely better to have the timeout depend on the timeout variable :-) |
Reviewer: Volker Braun |
comment:7
Replying to @vbraun:
:D Just wondering if we should add a doctest for that, but now it has already positive review... I was going to add one similar to Maarten's example (with some parallel sleeping processes, the default of |
comment:8
I already had a patch sorry guy's for making you do double effort but thanks for the quick fix :). I found this bug by reading the source code since I was trying to understand what they where doing. BTW I didn't respond earlier because the mailing system of the trac server was malfunctioning and didn't know others where working on it. The mailing server should work now. At least this message will test that for me :) |
comment:9
Ok trac wasn't fixed yet :(. Another test |
comment:10
Replying to @koffie:
For the record, I did get this one. [Another test :) ] |
Merged: sage-4.7.2.alpha2 |
With a timeout of 5 seconds I should not be able to perform a sleep of 40 seconds!
Component: performance
Keywords: sleep time-out
Author: Leif Leonhardy
Reviewer: Volker Braun
Merged: sage-4.7.2.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/11658
The text was updated successfully, but these errors were encountered: