Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wait() in @parallel #14150

Closed
jdemeyer opened this issue Feb 20, 2013 · 12 comments
Closed

Fix wait() in @parallel #14150

jdemeyer opened this issue Feb 20, 2013 · 12 comments
Assignees
Milestone

Comments

@jdemeyer
Copy link

The new doctesting framework sometimes gets:

sage -t --long devel/sage/sage/homology/simplicial_complex.py
**********************************************************************
File "devel/sage/sage/homology/simplicial_complex.py", line 2188, in sage.homology.simplicial_complex.SimplicialComplex.is_cohen_macaulay
Failed example:
    S.is_cohen_macaulay(ncpus=3)
Expected:
    False
Got:
    Exception OSError: (10, 'No child processes') in <generator object __call__ at 0x646f1e0> ignored
    False
**********************************************************************

Fix this.

Component: misc

Author: Jeroen Demeyer

Reviewer: David Roe

Merged: sage-5.8.beta2

Issue created by migration from https://trac.sagemath.org/ticket/14150

@roed314
Copy link
Contributor

roed314 commented Feb 20, 2013

comment:2

Looks good. You didn't add a doctest: is there one that consistently fails in the new framework?

@jdemeyer
Copy link
Author

comment:3

Replying to @roed314:

is there one that consistently fails in the new framework?

To be honest, I cannot say for sure why the problem occurs.

I'm fairly certain the problem is the big gap between

pid = os.wait()[0]

and

del workers[pid]

If some exception would occur in between, then workers[pid] would still be in the list of workers, even though we saw it exit. However, I cannot really explain where the exception could come from (can yield raise exceptions?)

@roed314
Copy link
Contributor

roed314 commented Feb 20, 2013

comment:4

How consistently is this error occurring in the new framework? Every time? Do the fixes here make the problem disappear? If so, I'm willing to give this a positive review, since there is a doctest failing that will no longer fail.

@jdemeyer
Copy link
Author

comment:5

Replying to @roed314:

How consistently is this error occurring in the new framework? Every time?

Not every time, but it's still reasonably common that I have seen it multiple times.

@jdemeyer
Copy link
Author

comment:6

Added doctest which always shows the OSError without this patch.

@roed314
Copy link
Contributor

roed314 commented Feb 22, 2013

comment:7

You should fix the unpickling after breaking it. Add

sage: from sage.structure.sage_object import unpickle_override
sage: del unpickle_override[('sage.rings.polynomial.polynomial_rational_flint', 'Polynomial_rational_flint')]

after the end of the TESTS block. Otherwise it looks good.

@roed314
Copy link
Contributor

roed314 commented Feb 22, 2013

Reviewer: David Roe

@jdemeyer
Copy link
Author

comment:8

Good point :-)

@jdemeyer
Copy link
Author

comment:9

Attachment: 14150_use_fork.patch.gz

@roed314
Copy link
Contributor

roed314 commented Feb 24, 2013

comment:10

Great.

@jdemeyer
Copy link
Author

Merged: sage-5.8.beta2

@vbraun
Copy link
Member

vbraun commented Dec 25, 2013

comment:12

Possibly related: #15585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants