Hi,

I hope this is enough of a bug report so that someone can do something
to fix it...

After an hour or so of trying to boil this down to its essence, I
think I have something nice and reproducible. If you apply the
attached patch, it adds a file
"sage/schemes/elliptic_curves/bug_in_parallel.py" which exposes the
bug. Here's what you can do to reproduce it (I've already tried, and I
can get this on geom with sage-4.3.2.alpha1):

sage: from sage.schemes.elliptic_curves.bug_in_parallel import foo
sage: foo()

This first time, everything goes as planned, and we break out of the
parallel-ed loop right way (at least it would seem so).

Each subsequent time you do

sage: foo()

it seems to break out of the loop before doing anything. This is
evidenced by the fact that "old" is still 99, bar doesn't print,
etc...

sage: from sage.schemes.elliptic_curves.bug_in_parallel import foo
sage: foo()
foo
bar
in loop, output = 0
breaking
Killing any remaining workers...
[Errno 3] No such process
old, after parallel loop: 0
sage: foo()
foo
20436
Killing any remaining workers...
old, after parallel loop: 99

This depends on "threads" and len("inputs") to both be at least 3,
otherwise everything goes well. This doesn't change when you change
machines (at least between my laptop and geom the behavior is the
same).




-- 
Robert L. Miller
http://www.rlmiller.org/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Attachment: bug_in_at_parallel.patch
Description: Binary data

Reply via email to