#10004: The gap instances in a parallelised function do not always have distinct
_local_tmpfile
--------------------------+-------------------------------------------------
Reporter: SimonKing | Owner: was
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-4.6
Component: interfaces | Keywords: _local_tmpfile, parallel
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------+-------------------------------------------------
Comment(by mpatel):
Replying to [comment:9 SimonKing]:
> Replying to [comment:8 mpatel]:
> > ... work in `Expect.quit`? Then you could simplify the `try` block in
`Expect._local_tmpfile`. It seems there's a tradeoff.
>
> That was my question: Is there a tradeoff? So, now that you taught me
how to deal with the double underscore attribute, I'll try to change my
patch accordingly.
I apologize for not being clear. I just meant there's a tradeoff in which
method (`quit` or `_local_tmpfile`) might have to do more work. Does one
typically get called much more often than the other? There may be a small
performance penalty in using `try-except` vs. `hasattr` vs. `None`. But
this probably only matters if we're making '''many''' calls to the
methods.
The patch looks good and I'll try to review it soon, if someone else
doesn't do it first.
> > Could you explain where `Expect.quit` is called (indirectly) in your
example in the description?
>
> OK, done. {{{quit}}} is called in {...@parallel}}}, because that
decorator needs to wipe all interfaces -- but it was not rigorous enough,
as it did not unset the name of the temporary file.
Thanks! I wasn't aware of the `quit` call in `parallel` (or `use_fork`)
itself.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10004#comment:11>
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.