On Thu, Jul 23, 2009 at 10:25 PM, David D.wrote: > > Hi, I'm trying to run a simple script that basically loops through a > long list of polynomials, does some things with them in Axiom, > and imports the results back to Sage.
I am very interested in your use of Axiom in Sage. I was beginning to think I was the only one doing this sort of thing. :-( > After running for a while (60-90 minutes) it will hang with the > message "Axiom crashed -- automatically restarting." At this point > I have to Interrupt and manually restart the loop at the point where > it failed. I am not so sure about the origin of the "Axiom crashed ..." message but besides an actual program crash, I think it might also simply indicate a communication failure between Sage and FriCAS. There have been problems with that on some platforms in the past. I have been running a slightly modified version of your code (modified for compatibility with an older version of Sage 3.2 and Mike Hansen's patches for Axiom) on a fairly fast processor for more than 3 hours. Output from a 'print a,b,c' debugging statement currently shows: ... -8 0 3 -8 0 4 (x^4 - 8*x^3 + 4*x + 1, [2, (3*y/4 + 3*x^2/2 - 3*x/2 - 3/4)/x^2]) -8 0 5 ... -8 2 0 -8 2 1 -8 2 2 ... With no failures so far. > > Is there any way to catch this error automatically so I can continue > processing without having to manually restart? I'd like to be able > to leave it running overnight or for days at a time, and manually > restarting it every hour is at best annoying. > > I've tested and the crash doesn't happen at any specific point in the > input or even on a specific axiom command, but it does seem to occur > after the same amount of time roughly (1-1.5 hours) even with > different input, so I don't believe it's a coding flaw (even though > that would probably be the easiest thing to fix). I'm more interested > in finding a way to handle this error, though, than preventing it from > happening. > I realize that you are more interested in a work-a-round than in finding the cause of the problem but as both a Sage user and an Axiom developer I am motivated to look into this problem a little further. > Running Sage 4.0.1 and Fricas 1.0.3 on Windows Vista. > By running "on Windows Vista", I presume that you mean you are running Sage (and FriCAS) on a virtual machine under Windows. Can you be more precise about exactly what versions you are running? What Sage source code or binary file did you download and build or install? How did you install Fricas 1.0.3? Was it built using clisp or ecl? How much memory is allocated for the virtual machine? > Here's the actual code I'm running, if it helps: > ... Thanks. I changed only two lines in your code: # if (gcd(D,diff(D,x)) != 1): return [0,0] if (axiom.gcd(D,diff(D,x)) != 1): return [0,0] # axiom.set('F', D) axiom('F:=%s'%axiom(D).name()) The first one calls the FriCAS version of gcd since the "native" gcd in Sage-3.2 was not able to handle some of your polynomials. The second change is just for compatibility with the older version of the FriCAS/Axiom interface. It works around a bug that I think is fixed in more recent versions of Sage. As far as I can tell these changes should not prevent the problem you are seeing. I expect that it is a deeper problem relating to memory and/or lisp version. If you are using FriCAS with ecl that is one of the first things I might suspect. In my case I am running an older version of Sage but a somewhat newer version of FriCAS. FriCAS is compiled with clisp under 32-bit Debian 5.0 on a 3.0 GHz processor with a large cache and 4 Gbytes memory. Sage 3.2 was built from source plus Mike Hansen's patched for axiom.py from trac (I believe these patches must have been included in Sage 4.0.1). I installed FriCAS 1.0.5 from http://sage.math.washington.edu/home/page/packages/fricas-1.0.5.spkg which I assembled from the build machinery in the spkg for fricas-1.0.3.p0 plus the newer FriCAS sources. --- I will let the current test run to completion (if possible) and let you know the result. If this succeeds, I will try building a new version of Sage and FriCAS that is closer to what you are running and try again to see if I am able to reproduce the problem. Regards, Bill Page. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---