Opened 13 years ago

Closed 12 years ago

#8410 closed defect (fixed)

Improve robustness of @parallel

Reported by: Kelly Boothby Owned by: tbd
Priority: major Milestone: sage-4.5.2
Component: performance Keywords:
Cc: wstein Merged in: sage-4.5.2.alpha0
Authors: William Stein Reviewers: Tom Boothby
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Run the following:

def sleeper(x):

for _ in sleeper([10]*100):

and interrupt it with ctrl-c (or esc in the notebook). We get

Killing any remaining workers...
[Errno 3] No such process
KeyboardInterrupt                         Traceback (most recent call last)

/home/boothby/<ipython console> in <module>()

/usr/local/sage/local/lib/python2.6/site-packages/sage/parallel/use_fork.pyc in __call__(self, f, inputs)
     98                         signal.alarm(int(walltime() - oldest)+1)
     99                     try:
--> 100                         pid = os.wait()[0]
    101                         signal.signal(signal.SIGALRM, signal.SIG_IGN)
    102                     except RuntimeError:

/usr/local/sage/local/lib/python2.6/site-packages/sage/interfaces/get_sigs.pyc in my_sigint(x, n)
      8 def my_sigint(x, n):
----> 9     raise KeyboardInterrupt
     11 def my_sigfpe(x, n):


and then, let's restart the computation:

sage: for _ in sleeper([10]*100):
    print "hello"
[Errno 39] Directory not empty: '/home/boothby/.sage/temp/'
Killing any remaining workers...

All I can do here is restart Sage.

Attachments (1)

trac_8410.patch (2.7 KB) - added by William Stein 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by William Stein

Milestone: sage-4.5

First remark: This fails *exactly* the same on the command line. Also the error is now:

sage: for _ in sleeper([10]*100):
....:         pass
Killing any remaining workers...

Changed 12 years ago by William Stein

Attachment: trac_8410.patch added

comment:2 Changed 12 years ago by William Stein

Status: newneeds_review

comment:3 Changed 12 years ago by Kelly Boothby

Status: needs_reviewpositive_review

works for me

comment:4 Changed 12 years ago by Mitesh Patel

Authors: William Stein
Merged in: sage-4.5.2.alpha0
Resolution: fixed
Reviewers: Tom Boothby
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.