On Jul 4, 2008, at 3:44 PM, Daryl Hammond wrote:
> [EMAIL PROTECTED] ~]$ /home/daryl/sage-3.0.1/sage > ---------------------------------------------------------------------- > | SAGE Version 3.0.1, Release Date: 2008-05-05 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > > sage: x = ZZ.random_element(2^2000000) > sage: y = ZZ.random_element(2^2000000) > sage: time z = x.xgcd(y) > CPU times: user 5.09 s, sys: 0.01 s, total: 5.11 s > Wall time: 5.13 > sage: quit > Exiting SAGE (CPU time 0m5.14s, Wall time 1m9.74s). > [EMAIL PROTECTED] ~]$ /home/daryl/sage-3.0.2/sage > ---------------------------------------------------------------------- > | SAGE Version 3.0.2, Release Date: 2008-05-24 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > > sage: x = ZZ.random_element(2^2000000) > sage: y = ZZ.random_element(2^2000000) > sage: time z = x.xgcd(y) > CPU times: user 95.05 s, sys: 0.02 s, total: 95.06 s > Wall time: 95.36 s > sage: quit > Exiting SAGE (CPU time 1m35.10s, Wall time 2m28.69s). Okay. What this probably means is that your sage 3.0.2 build is picking up a GMP from somewhere else entirely. The GMP shipped with sage has an asymptotically fast gcd routine, which is not present in vanilla GMP. The timings above suggest that the gcd in your 3.0.2 build is not asymptotically fast. (You could verify this by trying the same test above for say 2^4000000; if it was the sage version it should take about 190s, if it's the vanilla GMP version it should take about 380s.) If I was a unix guru I would know how to tell this directly, but this is best I could think of :-) So I suspect what happened is that when you messed around with the files in your sage-3.0.2 build, you somehow tricked sage into using a GMP from somewhere else. Again you could check this by rebuilding sage-3.0.2 from scratch (to be safe) and trying my previous multiplication speed test; if this theory is correct you should get the same times as for your 3.0.1 and 3.0.3 builds. Unfortunately this gets us back to square one, since it suggests that the original problem has nothing to do with GMP at all. Since no-one else is able to reproduce this problem, I can only think of two ways to proceed: (1) try by yourself to narrow down what is causing the slowdown. Find the simplest possible loop, or chunk of code, that illustrates the problem, maybe that will help us debug it via mailing list. (2) give someone here (e.g. me) remote access to your machine, so that we can try debugging it. I realise that may not be possible for various reasons. david --~--~---------~--~----~------------~-------~--~----~ 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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
