On Fri, Nov 22, 2013 at 7:22 AM, John Cremona <john.crem...@gmail.com> wrote:
> I am trying to use the @fork decorator as described here:
> http://www.sagemath.org/doc/reference/parallel/sage/parallel/decorate.html
> in order to force a function not to take more run time than some
> maximum.  The examples on that page all work but this does not.  Why
> not?
>
> sage: @fork(timeout=10, verbose=True)
> ....: def timedgens(E):
> ....:         return E.gens(descent_second_limit=10)
> ....:
> sage: for E in cremona_curves([35..45]):  print E.ainvs(), timedgens(E)
>
> (0, 1, 1, 9, 1) []
> (0, 1, 1, -131, -650) []
> (0, 1, 1, -1, 0) []
> (0, 0, 0, 0, 1) []
> (0, 0, 0, -15, 22) []
> (0, 0, 0, 0, -27) []
> (0, 0, 0, -135, -594) []
> (0, 0, 1, -1, 0) (('X',), <built-in function
> generic_factory_unpickle>, (<class
> 'sage.schemes.generic.homset.SchemeHomsetFactory'>, (5, 12),
> (127763792, 126836816, Category of schemes over Integer Ring), {}))
> ---------------------------------------------------------------------------
> IndexError                                Traceback (most recent call last)
>
> All goes well until the return value is a non-empty list, when this
> IndexError is triggered.  What on earth is going on?


@fork uses pickle to return results.  Maybe pickle doesn't work for
the objects you're returning?  Can you check pickling/unpickling them
directly (without using @fork).

William

> John
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to