#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: |
--------------------------+-------------------------------------------------
Comment(by SimonKing):
Meanwhile, it seems to me that the problem is ultimately caused by
setattr/getattr.
I work with the definition
{{{
def _local_tmpfile(self):
try:
return self.__local_tmpfile
except AttributeError:
self.__local_tmpfile = '%s/tmp'%SAGE_TMP_INTERFACE +
str(self.pid())
return self.__local_tmpfile
}}}
The following is rather irritating:
1. The attribute !__local_tmpfile can be accessed from within the method,
but not from outside.
{{{
sage: gap._local_tmpfile() is gap._local_tmpfile()
True
sage: gap.__local_tmpfile
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
...
AttributeError:
}}}
2. When setting the attribute !__local_tmpfile from outside, it can not be
retrieved from inside the _local_tmpfile method:
{{{
sage: gap.__local_tmpfile = 'foobar'
sage: gap._local_tmpfile()
'/home/king/.sage//temp/gauss/21283//interface//tmp21285'
sage: gap.__local_tmpfile
'foobar'
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10004#comment:3>
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.