Hi, Simon,

On Sep 24, 2010, at 11:00 AM, Simon King wrote:

On 24 Sep., 19:38, "Justin C. Walker" <[email protected]> wrote:
That is the crux of the problem.  This is a race condition (multiple
outcomes, depending on the ordering of operations, many of which are
outside of your control.  Debugging of these problems is why we pay
software developers the big bucks :-}

But, as stated in my previous posts, there is an alternative potential
source of problems: The Gap and the Singular interfaces use the *same*
file for processing long command lines; and moreover, Gap instances
that occur in different branches of a parallelised method share the
same file as well.

It may be that we are in violent agreement :-}

Since I make heavy use of both Gap and Singular and use
parallelisation in my tests, there is no need of a race condition for
explaining the problems that I met.

The fact that all (or some) instances use the same file make it a race condition for sure. It's just that in this case, there may be a very simple fix for it (Ryan's suggestion of using distinct temp files, for example).

One could solve part of the problem by making the filename dependent
on the pid of the interface instance. However, if one tries to cache
the filename, then Gap instances in different branches of a
parallelised method share the cache although they have different pid,
provided that the cache was created in the main Sage loop.

You're hip deep in this morass, so you are probably on the right track: I think if you remove the "sharing" of the external resources, you'll have fixed the problem.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
My wife 'n kids 'n dogs are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
-----------


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

Reply via email to