#6943: Make @parallel work for callable objects
----------------------+-----------------------------------------------------
 Reporter:  boothby   |       Owner:  boothby
     Type:  defect    |      Status:  new    
 Priority:  critical  |   Milestone:         
Component:  misc      |    Keywords:         
 Reviewer:            |      Author:         
   Merged:            |  
----------------------+-----------------------------------------------------
 The following should work:

 {{{
 @parallel
 @cached_function
 def foo(x):
     return x+1
 }}}

 however, when we attempt to evaluate foo...

 {{{
 sage: for k in foo(range(200)):
 ...       print k
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/home/boothby/.sage/sage_notebook/worksheets/admin/69/code/995.py", line
 7, in <module>
     for k in foo(range(_sage_const_200 )):\u000a    print k
   File "", line 1, in <module>

   File "/scratch/boothby/sage/local/lib/python2.6/site-
 packages/sage/parallel/multiprocessing.py", line 63, in parallel_iter
     fp = pickle_function(f)
   File "fpickle.pyx", line 60, in sage.misc.fpickle.pickle_function
 (sage/misc/fpickle.c:746)
 AttributeError: 'CachedFunction' object has no attribute 'func_code'
 }}}

 If any callable object is picklable, it should work with the parallel
 decorator.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6943>
Sage <http://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