#8410: Improve robustness of @parallel
---------------------------+------------------------------------------------
   Reporter:  boothby      |       Owner:  tbd
       Type:  defect       |      Status:  new
   Priority:  major        |   Milestone:     
  Component:  performance  |    Keywords:     
     Author:               |    Upstream:  N/A
   Reviewer:               |      Merged:     
Work_issues:               |  
---------------------------+------------------------------------------------
 Run the following:

 {{{

 @parallel(4)
 def sleeper(x):
     sleep(x)

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

 }}}

 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)
       7
       8 def my_sigint(x, n):
 ----> 9     raise KeyboardInterrupt
      10
      11 def my_sigfpe(x, n):

 KeyboardInterrupt:
 }}}

 and then, let's restart the computation:

 {{{
 sage: for _ in sleeper([10]*100):
     print "hello"
     pass
 ....:
 15775
 [Errno 39] Directory not empty:
 '/home/boothby/.sage/temp/sage.math.washington.edu/15401/dir_0'
 Killing any remaining workers...
 }}}

 All I can do here is restart Sage.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8410>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to