#10004: The gap instances in a parallelised function do not always have distinct
_local_tmpfile
--------------------------+-------------------------------------------------
   Reporter:  SimonKing   |       Owner:  was                     
       Type:  defect      |      Status:  new                     
   Priority:  blocker     |   Milestone:  sage-4.6.1              
  Component:  interfaces  |    Keywords:  _local_tmpfile, parallel
     Author:              |    Upstream:  N/A                     
   Reviewer:              |      Merged:                          
Work_issues:              |  
--------------------------+-------------------------------------------------
 Using the {...@parallel}}} decorator on a function, the Gap instances in
 the different branches of the function should have distinct files for I/O.

 Indeed, under normal circumstances, they are distinct:
 {{{
 sage: @parallel
 ....: def f(n):
 ....:     return gap._local_tmpfile()
 ....:
 sage: L = [t[1] for t in f(range(5))]
 sage: len(set(L))  # this is how it should be
 5
 }}}

 However, it suffices to call {{{gap._local_tmpfile()}}} in the main sage
 branch in order to break diversity:
 {{{
 sage: print gap._local_tmpfile()
 /home/king/.sage//temp/gauss/16041//interface//tmp16041
 sage: L = [t[1] for t in f(range(5))]
 sage: len(set(L))  # this is how it must not be
 1
 }}}

 The consequences are obvious: Having different processes use the same file
 for passing command lines must end in a disaster.

 I hope it is OK to mark this as blocker. After all, parallelisation and
 interfaces are both important.

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

Reply via email to