William Stein wrote: > > Steve (cc: sage-devel), > > Any chance you would have any time to port GAP to Itanium, as described > in your email below? So far, I failed to find anybody to do this so > far (is there > anybody out there on sage-devel who "is C programmer who can manage > a few lines of in-line assembler with GCC, an Itanium to test it on and > about > 30 lines of code."? -- I could provide the Itanium). > > I created this trac ticket to record this problem: > > http://trac.sagemath.org/sage_trac/ticket/1474 >
Slightly OT, but since we have a GAP developer here: Steve, has anybody ever gotten GAP to work under valgrind? I initially suspected sbrk() to be the issue, but after writing some tests it turns out that isn't it. We can take this offlist if you want. Cheers, Michael > On Aug 26, 2007 10:35 PM, Steve Linton <[EMAIL PROTECTED]> wrote: >> OK. The issue is with garbage collection. The GAP garbage collector >> looks for >> any C local variable which appears to contain a reference to a GAP >> object. If >> it finds one it assumes that it is a reference and keeps the object in >> question alive. This is done in GenStackFuncBags in gasman.c. There is >> relevant documentation about line 1474 and the code is at line 1667. A >> collection of horrible, but surprisingly portable hacks are used to find >> and >> scan all the C local variables on the stack and in the registers. >> >> The problems on Itanium are that an Itanium has two stacks. One is used >> for local variables, return addresses, etc. in the usual way. The other >> is used >> when the register file overflows. >> >> So what is needed is a few lines of assembler to >> >> 1) force the whole register file to be flushed onto this stack >> (SparcStackFuncBags does this on Sparc) >> >> 2) find the top and botom of this stack so that it can be scanned. >> >> It all works with -O0 because nothing is then kept in registers that is >> not >> also on the main stack, but this is cripplingly slow. >> >> If someone can come up with the assembler and the necessary wrapper to >> include >> it in gasman.c I can trivially adjust the C code to call it and then >> scan both >> stacks. >> >> Steve >> >> On Sun, 26 Aug 2007 21:49:52 -0700 >> "William Stein" <[EMAIL PROTECTED]> wrote: >> >> >> > On 8/26/07, Steve Linton <[EMAIL PROTECTED]> wrote: >> > > > (1) What's the latest status of this question? >> > > >> > > No change. >> > > >> > > > (2) Is there any hope? >> > > >> > > Yes. It needs a C programmer who can manage a few lines of in-line >> assembler >> > > with GCC, an Itanium to test it on and about 30 lines of code. >> > > If it acquired a high enough priority I would do it, but I can't >> hope to do it >> > > this month or next. I can explain what is needed about GAP in an >> email if you >> > > have a C programmer. >> > >> > I "have a C programmer", so if you could explain what is needed, it >> would >> > be greatly appreciated. >> > >> > > > (3) Who should I talk to? >> > > > >> > > Me. >> > >> > Excellent. >> > >> > > > Would giving a certain GAP developer a temporary account on an >> Itanium >> > > > machine help? It's possible that this could be arranged. >> > > > >> > > >> > > There aren't many of that are happy doing fiddly C work of this >> kind. I can >> > > see if anyone wants to try. >> > >> > Thanks. There are actually a lot of Itaniums at supercomputing >> centers >> > in the US, for some reason. >> > >> > William >> >> >> >> -- >> Steve Linton School of Computer Science & >> Centre for Interdisciplinary Research in Computational Algebra >> University of St Andrews Tel +44 (1334) 463269 >> http://www.cs.st-and.ac.uk/~sal Fax +44 (1334) 463278 >> > > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@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-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---