On Dec 9, 2007 8:01 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm trying to use the combinatorics features in Sage to do some Chern > class calculations. When I run the commands below, I get exceptions > that I don't know how to interpret. > > The same calculation in Maple using John Stembridge's SF package > completes successfully using roughly 149 MB and 7.08 s CPU time. > > Is this just an issue of memory limitation? If so, can (and how do) I > lift the limitation to access more of the 2 GB I have on the machine > I'm running this on? > > code follows: > I'm using Sage 2.8.15 on an i386 Linux platform. I also tried this on > an Intel OS X 10.5 machine with the same result. Also, all the powers > of "f" from 1 to 7 work fine. f^8 and higher powers fail. > ----------------------------------- > > sage: s=SFASchur(QQ) > sage: f=s([2,1]); f > s[2, 1] > sage: f^8 > --------------------------------------------------------------------------- > <type 'exceptions.NotImplementedError'> Traceback (most recent call > last) > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/ > <ipython console> in <module>() > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/ > local/lib/python2.5/site-packages/sage/combinat/sfa.py in > __pow__(self, n) > 881 z = A(Integer(1)) > 882 for i in range(n): > --> 883 z *= self > 884 return z > 885 > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/ > element.pyx in sage.structure.element.RingElement.__imul__() > > . > . > . > . > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/ > symmetrica.pxi in sage.libs.symmetrica.symmetrica._py() > > <type 'exceptions.NotImplementedError'>: 22 > sage:
Mike Hansen -- who wrote the code you're using -- will likely have to answer this question better than me. I suspect perhaps Symmetrica was compiled with certain hard-coded options set, and they were only set to allow up to something of "degree 7", i.e., this works: sage: s=SFASchur(QQ); f=s([2,1]); f s[2, 1] sage: time g=f^7 CPU times: user 0.17 s, sys: 0.00 s, total: 0.17 s Wall time: 0.17 sage: time g=f^6 CPU times: user 0.07 s, sys: 0.00 s, total: 0.07 s Wall time: 0.07 sage: time g=f^5 CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s Wall time: 0.03 Notice by the way that the time goes up by about 2.5 every time, so it would likely take about 0.42 seconds to do the calculation you want will likely be nearly 17 times faster in Sage than in John Stembridge's SF package one the above issue gets resolved. Important note: There is a brand new Symmetrica release (maybe 4 years in the making): http://trac.sagemath.org/sage_trac/ticket/1417 This might fix the above issue, etc. I'm going to try that new spkg out along with the corresponding patch to see if it fixes the problem... William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---