[sage-support] Re: unable to get SAGE working on my debian lenny machine ...
On Wed, May 27, 2009 at 4:34 PM, Kim, In-Jae in-jae@mnsu.edu wrote: I wanted to use sage in Linux system so that I installed Ubuntu using VirtualBox into my laptop with Window Vista OS. The version of Ubuntu that I have is 9.04. You had created a virtual machine without enough disk space. You should create a new virtual machine with at least 4 GB of disk space. Then you could install Ubuntu and Sage on it without worry about disk space. -- Johan () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: GAP still doesn't start in sage-3.4.1...
On Sat, May 2, 2009 at 10:29 AM, William Stein wst...@gmail.com wrote: Is there enough space so you could try doing everything in /tmp or /local or some other *non*-NSF local partition? I've just tried in /tmp and got exactly the same error. the log is available here: http://www.lri.fr/~oudinet/pub/debiansage3.log -- Johan () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: GAP still doesn't start in sage-3.4.1...
On Fri, May 1, 2009 at 11:13 PM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On May 1, 5:48 am, Johan Oudinet johan.oudi...@gmail.com wrote: On Fri, May 1, 2009 at 2:24 AM, mabshoff SNIP Hi Johan, Can you give a little more detail? By sheer accident it was just Well, this is exactly what I've done: 0) ssh to the server as a normal user. 1) download sage-3.4.1-linux-Debian_GNU_Linux_5.0_lenny-sse2-x86_64-Linux.tar.gz from France mirror 2) decompress it (tar xzf) 3) cd sage-3.4.1-linux-Debian_GNU_Linux_5.0_lenny-sse2-x86_64-Linux 4) ./sage Ok. Does gap start by itself, i.e. ./sage -gap? What more detail can I give you? $ uname -a Linux serveur-fortesse 2.6.24-22-xen #1 SMP Mon Nov 24 21:35:54 UTC 2008 x86_64 GNU/Linux revealed in IRC that inside a chroot env without the pty dev filesystem mounted pexpect obviously doesn't work. Any chance this is something that could have happened to you? I don't think so... AFAIK, I didn't run sage from a chroot env. But I don't know if 'pty dev filesystem' was mounted. What should I do to verify this? Please post the output of mount. I am not sure what else related to xen could be a factor here. $ mount /dev/hda1 on / type ext3 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) automount(pid2614) on /local type autofs (rw,fd=4,pgrp=2614,minproto=2,maxproto=4) automount(pid2642) on /users type autofs (rw,fd=4,pgrp=2642,minproto=2,maxproto=4) automount(pid2872) on /tmpsim type autofs (rw,fd=4,pgrp=2872,minproto=2,maxproto=4) automount(pid2962) on /special type autofs (rw,fd=4,pgrp=2962,minproto=2,maxproto=4) netapp2:/vol/Logiciels/Fortesse on /special/fortesse type nfs (rw,intr,soft,addr=129.175.1.2) netapp-11:/vol/Equipe_asspro/asspro on /users/asspro type nfs (rw,nosuid,intr,hard,tcp,timeo=600,retrans=2,addr=129.175.1.7) And I try to run Sage from /users/asspro Have you used and/or installed another version of GAP independently of Sage? No. Is there any Sage release that ever worked on your platform? No (I've tried since Sage-3.2.3) -- Johan () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: GAP still doesn't start in sage-3.4.1...
On Fri, May 1, 2009 at 2:24 AM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On Apr 28, 6:24 am, Johan Oudinet johan.oudi...@gmail.com wrote: Hi, Hi Johan, I saw in trac that the ticket about my problem to start Sage in a Debian Lenny 64bit is closed since GAP was downgraded. We closed it since the problem was seemingly related to the new GAP. I thought Sage-3.4.1 should now works on my server... but it still doesn't. And the problem is still the same. When I run sage for the first time, I got: * RuntimeError: Unable to start gap because the command 'gap -r -b -p -T -o G /users/asspro/oudinet/projects/sage-3.4.1-linux-Debian_GNU_Linux_5.0_lenny-sse2-x86_64-Linux/data//extcode/gap/sage.g' failed. Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed. * Any clue? Can you give a little more detail? By sheer accident it was just Well, this is exactly what I've done: 0) ssh to the server as a normal user. 1) download sage-3.4.1-linux-Debian_GNU_Linux_5.0_lenny-sse2-x86_64-Linux.tar.gz from France mirror 2) decompress it (tar xzf) 3) cd sage-3.4.1-linux-Debian_GNU_Linux_5.0_lenny-sse2-x86_64-Linux 4) ./sage What more detail can I give you? $ uname -a Linux serveur-fortesse 2.6.24-22-xen #1 SMP Mon Nov 24 21:35:54 UTC 2008 x86_64 GNU/Linux revealed in IRC that inside a chroot env without the pty dev filesystem mounted pexpect obviously doesn't work. Any chance this is something that could have happened to you? I don't think so... AFAIK, I didn't run sage from a chroot env. But I don't know if 'pty dev filesystem' was mounted. What should I do to verify this? -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] GAP still doesn't start in sage-3.4.1...
Hi, I saw in trac that the ticket about my problem to start Sage in a Debian Lenny 64bit is closed since GAP was downgraded. I thought Sage-3.4.1 should now works on my server... but it still doesn't. And the problem is still the same. When I run sage for the first time, I got: * RuntimeError: Unable to start gap because the command 'gap -r -b -p -T -o G /users/asspro/oudinet/projects/sage-3.4.1-linux-Debian_GNU_Linux_5.0_lenny-sse2-x86_64-Linux/data//extcode/gap/sage.g' failed. Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed. * Any clue? -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: shift-return, shift-enter, click-mouse-on-evaluate. on evaluating a cell in a notebook
On Tue, Apr 21, 2009 at 3:25 PM, Nasser Abbasi n...@12000.org wrote: On Apr 21, 4:57 am, kcrisman kcris...@gmail.com wrote: Hi Nasser, Just out of curiosity, what about Shift-Return (as opposed to Shift- Enter)? If I use my thumb, I can even press both with the same finger, though usually I use 2nd and 3rd fingers. Or does that not work with your keyboard configuration? Hope we can help you resolve this soon! Yes. SHIFT-RETURN could be done with one hand because as you said, the RETURN key is in a very close proximity to the SHIFT key (on my keyboard at least). The problem though, to do this with one hand, one must twist the thumb in 90 degree angle as one it hitting on RETURN key with the index finger, (I do not think I could press both keys with just one finger), and my thumb has a bit of arthritis which makes hard to bend it too much. It is also a bit awkward to hit a key with a finger twisted in this fashion. I just tried it. Try a keyboard adapted to your hands: http://www.typematrix.com/ So, you can press both SHIFT and RETURN without twisting your fingers ;) -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: weird behaviour when selecting a row/column from a matrix
On Wed, Mar 25, 2009 at 11:39 AM, Christophe Oosterlynck tif...@gmail.com wrote: Any comments on this? it's really strange that when getting a vector from the matrix a b = a[:,0] you have to use an extra index when you want to select an element from that vector b: b[0][0] instead of just b[0] (this gives a list with 1 element...) No it's not. `b' is also a matrix. So if you just give one argument, you get a list of elements: a[0] (1,0) a[0,0] 1 b[0] (1) b[0,0] 1 Regards, On Mar 19, 3:39 pm, Christophe Oosterlynck tif...@gmail.com wrote: Hi, let me dive straight into my problem wit a simple example: a = identity_matrix(ZZ,2,2) a[0,0] 1 vs. a[:,0] [1] [0] a[:,0][0] (1) So when selecting an element from a matrix by first selecting a row and selecting the wanted element in that new 'row object', I don't get an element from ZZ but a FreeModuleElement. Why is this happening? Is there a way to make my two actions behave like selecting an element from the original matrix? Thanks, -- Johan Oudinet --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: new cpu flag in 3.4 x86_64 binaries: sse4_1?
On Tue, Mar 17, 2009 at 1:20 PM, Art grenan...@gmail.com wrote: The sage 3.4 Linux x86_64 binaries have acquired a new sage-flags.txt, sse4_1. I used: sage-3.2.3-debian-64bit-intel_xeon-x86_64-Linux.tar.gz which works perfectly on an intel xeon 5160 but the update to 3.4 gives me the warning flag when starting sage. I think this processor was released in June 2006. Is it already out of date? Or is there something wrong with my setup. Yes, your processor is out of date ;) As wikipedia mention it: http://en.wikipedia.org/wiki/SSE4 This instruction set was released in fall 2006 (So just after you bought your processor, sorry :) But, it's just a warning, and I think you can remove it by just deleting a file and run Sage-3.4 without any problem, don't you? -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: SSE4_1 errors when running sage 3.4
On Wed, Mar 18, 2009 at 4:20 PM, bix...@gmail.com bix...@gmail.com wrote: Hi, After using version 3 for over a year, it finally occured to me I should upgrade. When trying to start version 3.4 I get: -- | Sage Version 3.4, Release Date: 2009-03-11 | | Type notebook() for the GUI, and license() for information. | -- ** WARNING! This Sage install was built on a machine that supports instructions that are not available on this computer. Sage will likely fail with ILLEGAL INSTRUCTION errors! The following processor flags were on the build machine but are not on this computer: sse4_1 Email http://groups.google.com/group/sage-support for help. To remove this warning and make Sage start, just delete /home/bixbyr/Desktop/sage-3.4-linux-Ubuntu_8.10-i686-Linux/local/ lib/sage-flags.txt ** I tried removing this file to see if sage will run correctly, it doesn't seem to. For a quick stress test I did sage: prime_pi(10^10) ... and got back /home/bixbyr/Desktop/sage-3.4-linux-Ubuntu_8.10-i686-Linux/local/bin/ sage-sage: line 197: 8689 Segmentation fault sage-ipython $@ - i It returns correctly for prime_pi(10^9), so although it's possible that the two errors are unrelated, that seems a strange way to fail if the issue were related to insufficient memory. I downloaded sage-3.4-linux-Ubuntu_8.10-i686-Linux.tar.gz from the University of Washington mirror. I'm running ubuntu 8.10, kernel version 2.6.27-11-generic. I have 4gb of ram, though running a 32 bit kernel effectively limits me to ~3.2 gb. Since sse4 is a cpu instruction set (from what I understand), here it the output for cat / proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz stepping : 11 cpu MHz : 1600.000 cache size : 4096 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm bogomips : 4799.97 clflush size : 64 power management: ( ... it then lists 3 more processors with the same information) Although not the newest processor, it seems like this should be recent enough to run sage. I also tried installing the new version on my laptop, another ubuntu 8.10 system this time with a core 2 duo processor, and got the exact same error. Any thoughts? Thanks a lot, Have you tried to build Sage from sources? If you also get the same error, it will mean this is not an error related to your cpu instruction set. -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: Sage binaries doesn't work on a Debian Lenny 64bit server with Intel Xeon Dual core and Xen hypervisor
On Thu, Feb 26, 2009 at 4:08 PM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: Some more update: -p is at fault here, but that startup option isn't documented in the GAP help, so I have started looking at the source code what it is exactly supposed to do. Either way, if you look at interfaces/gap.py in def _execute_line(self, line, wait_for_prompt=True, expect_eof=False): you will see that the info created by -p is used and given the interface to GAP was written by Steve Linton (who is one of the current GAP maintainers) I am sure that it is done so for a good reason. So, what is the fix then? Likely an adjustment to the pexepct interface for GAP, but so far I have little lead what to do here. Other people will hopefully have a shorter learning cure for that code. Just to mention I also tried sage-3.4 binary for Debian Lenny and got exactly the same error (but I have to remove a file that warns about the absence of sse4_1 flag before). So, it confirms this GAP bug is still present in sage-3.4. -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: Getting a numerical value
On Fri, Mar 13, 2009 at 3:19 PM, hpon peter.norli...@gmail.com wrote: Hi, How do I get a numerical value? I have a multi-parameter function where all the parameters have been substituted by numerical values. I want Sage to calculate the expression's numerical value. At the moment Sage prints: 1/sqrt((sqrt(3)/2 - 0.0173205080757)^2 - 0.0001) - and so on Do you know how to use the documentation? For example, in the notebook, I write : a = sqrt(3) Then, a.tab gives me the list of methods available... and you can find numerical_approx which sounds to be what you want... and if you want details of a specific method, just add a question mark at the end. For example: a.numerical_approx? *** Type:type 'instancemethod' Definition: a.numerical_approx(prec, digits) Docstring: Return a numerical approximation of self as either a real or complex number with at least the requested number of bits or digits of precision. NOTE: You can use foo.n() as a shortcut for foo.numerical_approx(). INPUT: prec -- an integer: the number of bits of precision digits -- an integer: digits of precision OUTPUT: A RealNumber or ComplexNumber approximation of self with prec bits of precision. EXAMPLES: sage: cos(3).numerical_approx() -0.989992496600445 Use the n() shortcut: sage: cos(3).n() -0.989992496600445 Higher precision: sage: cos(3).numerical_approx(200) -0.98999249660044545727157279473126130239367909661558832881409 sage: numerical_approx(cos(3), digits=10) -0.9899924966 sage: (i + 1).numerical_approx(32) 1. + 1.*I sage: (pi + e + sqrt(2)).numerical_approx(100) 7.2740880444219335226246195788 *** After reading the details, you know you can also use the n() shortcut ;) Hope you will find the answer to your next question by yourself ;) Best, -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: Sage binaries doesn't work on a Debian Lenny 64bit server with Intel Xeon Dual core and Xen hypervisor
On Tue, Feb 17, 2009 at 9:34 PM, William Stein wst...@gmail.com wrote: On Tue, Feb 17, 2009 at 9:52 AM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On Feb 17, 9:41 am, Johan Oudinet johan.oudi...@gmail.com wrote: Hi, Hi Johan, I've just download the Debian-64bit-intel-xeon version of sage, then extract, run ./sage and get an unexpected error: $ ./sage -- | Sage Version 3.2.3, Release Date: 2009-01-05 | | Type notebook() for the GUI, and license() for information. | -- The SAGE install tree may have moved. Regenerating Python.pyo and .pyc files that hardcode the install PATH (please wait at most a few minutes)... Do not interrupt this. ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (1087, 0)) --- RuntimeError Traceback (most recent call last) SNIP TRACEBACK MESSAGES RuntimeError: Unable to start gap because the command 'gap -b -p -T -o G /users/asspro/oudinet/projects/sage-3.2.3-debian-64bit- intel_xeon-x86_64-Linux/data//extcode/gap/sage.g' failed. Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed. The entire log is available here:http://www.lri.fr/~oudinet/pub/debiansage.log Since I have no idea how to solve this problem, I hope someone here has a solution? No surprise here since that Sage release was build for the last stable release. In the future Sage 3.3 binaries should be properly marked since otherwise people end up getting the wrong binaries. So far no one has set up the needed build machines for lenny so that we will have binaries for it, but I expect this to happen in the not too distant future since most Debian people ought to upgrade to lenny soon. For now I recommend building from sources. And for the record I'm *currently* installing 32 and 64-bit Debian images. I've tried to build from sources sage-3.3 but I still have an unexpected error when running sage :-( The log is available here: http://www.lri.fr/~oudinet/pub/debiansage2.log I add that when I manually try to execute the command gap with the same options, I get : $ gap -r -b -p -T -o G /usr/local/sage-3.3/data//extcode/gap/sage.g @p...@!19924+@20...@#91395+@$71...@%24361+@675...@!24824+@77...@#33736+@$59...@%21601+@675...@!48921+@95...@#09404+@$32...@%5248+@675...@!2688+@63...@#95313+@$02...@%0796+@675...@!3448+@52...@#54952+@$86...@%2475+@675...@!7689+@9...@#89662+@$92...@%2454+@675...@!3448+@11...@#75312+@$77...@%4233+@675...@ngap4, Version: 4.4.12 of 17-Dec-2008, x86_64-unknown-linux-gnu-...@j@!0012+@3...@#0944+@$1...@%6262+@675...@ngap @i For the record, I've followed the installation guide found here: http://www.sagemath.org/doc/inst/node8.html -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: Sage binaries doesn't work on a Debian Lenny 64bit server with Intel Xeon Dual core and Xen hypervisor
On Thu, Feb 26, 2009 at 2:55 PM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On Feb 26, 5:46 am, Johan Oudinet johan.oudi...@gmail.com wrote: On Tue, Feb 17, 2009 at 9:34 PM, William Stein wst...@gmail.com wrote: Hi Johan, SNIP I've tried to build from sources sage-3.3 but I still have an unexpected error when running sage :-( The log is available here:http://www.lri.fr/~oudinet/pub/debiansage2.log I add that when I manually try to execute the command gap with the same options, I get : $ gap -r -b -p -T -o G /usr/local/sage-3.3/data//extcode/gap/sage.g @p...@!19924+@20...@#91395+@$71...@%24361+@675...@!24824+@77...@#33736+@$ 59...@%21601+@675...@!48921+@95...@#09404+@$32...@%5248+@675...@!2688+@ 63...@#95313+@$02...@%0796+@675...@!3448+@52...@#54952+@$86...@%2475+@67 5...@!7689+@9...@#89662+@$92...@%2454+@675...@!3448+@11...@#75312+@$7761 +...@%4233+@675...@ngap4, Version: 4.4.12 of 17-Dec-2008, x86_64-unknown-linux-gnu-...@j@!0012+@3...@#0944+@$1...@%6262+@675...@nga p @i Ok, that does not look pretty. Do you have a gap.rc file on your box by any chance, i.e. do you run GAP with a custom config file? I don't think so. Actually, I don't know what GAP is (so I never used it) and both locate gap.rc and find ~ -name 'gap.rc' don't find anything. For the record, I've followed the installation guide found here:http://www.sagemath.org/doc/inst/node8.html Ok. We have seen this or a seemingly similar problem on a build machine we have access to, so we are investigating. I have made this a critical issue against 3.4, i.e. http://trac.sagemath.org/sage_trac/ticket/5385 Three questions: * Does sage -gap give you a working GAP without all that odd output? sage -gap starts without complain, and I can type ?help for example... but I don't know what do you mean by a working GAP * What is LOCALE set to? I think it is unset: $echo $LOCALE $ test -z $LOCALE; echo $? 0 * Could you compress install.log and post a link to it so that I can download it and take a look? Maybe something common or odd will pop up. Here it is: http://www.lri.fr/~oudinet/pub/install.log.bz2 -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: function evaluation
On Mon, Feb 23, 2009 at 1:25 PM, Stefanie Schmidt prur...@web.de wrote: thank you for you quick answers! it works. but my example in my previous mail was only a simplification of my real problem. your answer works fine with my simplification. but I am not shure what to do with my original problem. I want to plot a function of two variables, but with one variable fixed. I have def g(f,s): (quiet long here with a lot of cases...) and I want to plot for example plot(g(x,90),48,51) def h(x): return g(x,90) plot(h,48,51) -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] memory overflow when augmenting a matrix
Hi, When I using the following simple script to get a square dxd inversible matrix (T) from a dxr matrix (T0), I got a memory overflow: ### T=T0;rt=r;d=A.ncols();i=0 while rt != d: while rt == rank(T.augment(matrix(d,1,{(i,0):1}))): i+=1 T=T.augment(matrix(d,1,{(i,0):1})) rt+=1 ### Since the matrix A is a dxd - with d equals to 1183 - that easily fits into the memory (4GB), it seems strange to me that this script needs more and more memory until reach a memory overflow. Maybe there is a memory leak in the function rank or augment? Or, more likely, I did something wrong when writing this script (since I'm a beginner in both Sage and Python)? The entire script (with the 1183x1183 matrix) is available here: http://www.lri.fr/~oudinet/pub/script.sage I'd appreciate any help. Regards, --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Sage binaries doesn't work on a Debian Lenny 64bit server with Intel Xeon Dual core and Xen hypervisor
Hi, I've just download the Debian-64bit-intel-xeon version of sage, then extract, run ./sage and get an unexpected error: $ ./sage -- | Sage Version 3.2.3, Release Date: 2009-01-05 | | Type notebook() for the GUI, and license() for information.| -- The SAGE install tree may have moved. Regenerating Python.pyo and .pyc files that hardcode the install PATH (please wait at most a few minutes)... Do not interrupt this. ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (1087, 0)) --- RuntimeError Traceback (most recent call last) SNIP TRACEBACK MESSAGES RuntimeError: Unable to start gap because the command 'gap -b -p -T -o G /users/asspro/oudinet/projects/sage-3.2.3-debian-64bit- intel_xeon-x86_64-Linux/data//extcode/gap/sage.g' failed. Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed. The entire log is available here: http://www.lri.fr/~oudinet/pub/debiansage.log Since I have no idea how to solve this problem, I hope someone here has a solution? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: memory overflow when augmenting a matrix
Hi Michael, On Tue, Feb 17, 2009 at 6:49 PM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On Feb 17, 8:59 am, Johan Oudinet johan.oudi...@gmail.com wrote: Hi, Hi Johan, When I using the following simple script to get a square dxd inversible matrix (T) from a dxr matrix (T0), I got a memory overflow: ### T=T0;rt=r;d=A.ncols();i=0 while rt != d: while rt == rank(T.augment(matrix(d,1,{(i,0):1}))): i+=1 T=T.augment(matrix(d,1,{(i,0):1})) rt+=1 ### Since the matrix A is a dxd - with d equals to 1183 - that easily fits into the memory (4GB), it seems strange to me that this script needs more and more memory until reach a memory overflow. Maybe there is a memory leak in the function rank or augment? Or, more likely, I did something wrong when writing this script (since I'm a beginner in both Sage and Python)? The entire script (with the 1183x1183 matrix) is available here:http://www.lri.fr/~oudinet/pub/script.sage What Sage release are you running? It sounds very much like this could be a memory leak. I've just downloaded the Linux binaries from Sage website (the ubuntu-64bit-intel-xeon version) Sage Version 3.2.3, Release Date: 2009-01-05 The matrix is sparse and pre Sage 3.3 rank was computed using pari How can I get Sage 3.3? From the Sage website, I can only find the 3.2.3 version. which tends to blow up since it uses *a lot* of memory. We now switch back to computing the rank of such a matrix by using the much faster dense representation, but John Palmieri as the author of that code should fill you in on the details there. Actually, I plan to using this code for larger matrices (up to 10^4), so I don't think I could use a dense representation, do you? I'd appreciate any help. I am running the computation right now on a box with 128 GB, so we will see how far I get :) Right now we are in the 30th iteration of Wow! 128GB, it's very nice for doing such computations! How can you know the number of iterations in a Sage script? Is there a debug mode, or something like that? while rt != d: while rt == rank(T.augment(matrix(d,1,{(i,0):1}))): i+=1 T=T.augment(matrix(d,1,{(i,0):1})) rt+=1 and we are already consuming about 2.5GB RAM. There are some known problem with LA in Sage that are leaky, but I suspect those are reference count issues in Cython. Cython 0.11 out soon should help there with the new reference count nanny. Well, my goal is to find a matrix B and a number n such that for every number kn, B*A^(k+1) == A^k with respect to A is a dxd sparse matrix over Rational field (actually A is an adjacency matrix of a finite directed graph). The algorithm I implemented works (at least for small matrix and where rank(A^k) 0), but it's not really optimized (I'm far from being an expert in linear algebra)! I'm interesting in a faster algorithm for both numerical and exact solutions. So, if someone knows a better solution (for example, a classical algorithm in linear algebra that solves this problem), I'll be glad to have some references ;-) Best regards, -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: Sage binaries doesn't work on a Debian Lenny 64bit server with Intel Xeon Dual core and Xen hypervisor
On Tue, Feb 17, 2009 at 6:52 PM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On Feb 17, 9:41 am, Johan Oudinet johan.oudi...@gmail.com wrote: Hi, Hi Johan, I've just download the Debian-64bit-intel-xeon version of sage, then extract, run ./sage and get an unexpected error: Since I have no idea how to solve this problem, I hope someone here has a solution? No surprise here since that Sage release was build for the last stable release. In the future Sage 3.3 binaries should be properly marked since otherwise people end up getting the wrong binaries. So far no one has set up the needed build machines for lenny so that we will have binaries for it, but I expect this to happen in the not too distant future since most Debian people ought to upgrade to lenny soon. For now I recommend building from sources. Cheers, Thanks Michael for the quick answer. I'll try to build Sage from sources. Cheers, -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: memory overflow when augmenting a matrix
On Tue, Feb 17, 2009 at 10:08 PM, William Stein wst...@gmail.com wrote: On Tue, Feb 17, 2009 at 10:36 AM, Johan Oudinet johan.oudi...@gmail.com wrote: On Tue, Feb 17, 2009 at 6:49 PM, mabshoff michael.absh...@mathematik.uni-dortmund.de wrote: On Feb 17, 8:59 am, Johan Oudinet johan.oudi...@gmail.com wrote: Actually, I plan to using this code for larger matrices (up to 10^4), so I don't think I could use a dense representation, do you? If you actually want to do this problem (esp. up to 10^4), you should actually use a dense matrices modulo a fixed prime = 4. You might also need access to our 128GB RAM box (we'll see). I understand the advantage to compute over a GF, but how can I be sure the result is still valid over a rational field? I mean, if I have to compute modulo a fixed prime, I should do the same computation with several prime numbers and then recompose the result, shouldn't? There are numerous inefficiencies in your script, e.g., in computing the rank of A and Ap*A you're doing exactly the same hard computation of one of the ranks twice. If you don't work modulo a prime, the coefficients of the products will surely blow up massively, and you'll get huge dense matrices with huge coefficients, as you observed. I've written a script to get you started on the right path: http://sage.math.washington.edu/home/was/comp/oudinet/ Note that I had to make a number of changes to your script to make it more efficient and have more debugging output so one can see what is happening. Running it, I can see it'll likely take a couple hours to finish and probably use 1GB RAM (see below). I'm stopping it, but you can run it on your computer. best of luck, William Thank you very much for both your improvements and the debugging output! I also agree with your comment about the stupidity of the algorithm to extend the matrix to a square invertible matrix and that it must have a better way to do this... And your estimations are quite accurate! It took 30 minutes and used 1GB of RAM. Thanks again! -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: memory overflow when augmenting a matrix
On Tue, Feb 17, 2009 at 7:56 PM, Jason Grout jason-s...@creativetrax.com wrote: mabshoff wrote: On Feb 17, 10:36 am, Johan Oudinet johan.oudi...@gmail.com wrote: Hi Michael, Hi Johan, SNIP I've just downloaded the Linux binaries from Sage website (the ubuntu-64bit-intel-xeon version) Sage Version 3.2.3, Release Date: 2009-01-05 Ok. The matrix is sparse and pre Sage 3.3 rank was computed using pari How can I get Sage 3.3? From the Sage website, I can only find the 3.2.3 version. Sage 3.3 isn't released yet, but there is another release candidate tonight, i.e. 3.3.rc2. Sage 3.3 it self should be out in the next 2, 3 days, but it has been slower than we had planned. which tends to blow up since it uses *a lot* of memory. We now switch back to computing the rank of such a matrix by using the much faster dense representation, but John Palmieri as the author of that code should fill you in on the details there. Actually, I plan to using this code for larger matrices (up to 10^4), so I don't think I could use a dense representation, do you? Well, you do multiplies AFAIK and that should destroy the sparse structure rather quickly assuming your matrix doesn't have a special structure. So, any ideas if the sparse structure is preserved? I'd appreciate any help. I am running the computation right now on a box with 128 GB, so we will see how far I get :) Right now we are in the 30th iteration of Wow! 128GB, it's very nice for doing such computations! Well, I didn't pay for it :) How can you know the number of iterations in a Sage script? Is there a debug mode, or something like that? I just added a print statement in the loops. If this all ended I didn't really want to see True or False at the end :) After about 60 minutes and maybe 80 iterations in rt I killed it consuming about 40GB of RAM. So something is going wrong. Two thoughts: * you are hitting a yet diagnosed memory leak - I will check that * since your matrix coefficients are rational they just explode - not much we can do about that. Using a ring with finite precision, i.e. RealField() might avoid that. * your sparse structure gets destroyed and you end up with dense matrices anyway, ergo bye bye free RAM Obviously it can be all three :) Since I'm just adding sparse vectors, I don't think the sparse structure is destroyed here. But, as the computation works with a ring with finite precision (GF(997)), the problem should be on the coefficient explosion (when computing the rank) and/or a memory leak in the rank function applied to a sparse matrix over Rational field. while rt != d: while rt == rank(T.augment(matrix(d,1,{(i,0):1}))): i+=1 T=T.augment(matrix(d,1,{(i,0):1})) rt+=1 and we are already consuming about 2.5GB RAM. There are some known problem with LA in Sage that are leaky, but I suspect those are reference count issues in Cython. Cython 0.11 out soon should help there with the new reference count nanny. Well, my goal is to find a matrix B and a number n such that for every number kn, B*A^(k+1) == A^k with respect to A is a dxd sparse matrix over Rational field (actually A is an adjacency matrix of a finite directed graph). The algorithm I implemented works (at least for small matrix and where rank(A^k) 0), but it's not really optimized (I'm far from being an expert in linear algebra)! I'm interesting in a faster algorithm for both numerical and exact solutions. So, if someone knows a better solution (for example, a classical algorithm in linear algebra that solves this problem), I'll be glad to have some references ;-) Ok, I am not the guy who knows the literature well, so someone else needs to answer this. But there are plenty of people from graph theory around here. :) If you're willing, could you rephrase the problem in terms of directed graphs, if that is a natural way to look at it? Well, in terms of directed graphs, I have a graph where its vertices and edges are related to a recurrence relation as follows: V(0) = 1 (or could be 0 in a generalized version of my problem) and for each n 0: V(n+1) = \sum_{over the successors, V^\prime, of V} V^\prime(n) And I want to build a graph that its edges are labeled by rational numbers and that represents the inverse of the previous recurrence relation: V(N) = CN (a finite number) V(0) = 1, V(1) = C1, ..., V(k) = Ck and for each n st k n N: V(n) = \sum_{V - e - V^\prime} e * V^\prime(n+1) But I have no idea how to build this graph directly from the first graph, that's why I prefer formulating the problem as a linear algebra problem. -- Johan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-support] Re: memory overflow when augmenting a matrix
On Wed, Feb 18, 2009 at 1:21 AM, William Stein wst...@gmail.com wrote: On Tue, Feb 17, 2009 at 4:13 PM, Johan Oudinet johan.oudi...@gmail.com wrote: On Tue, Feb 17, 2009 at 7:56 PM, Jason Grout jason-s...@creativetrax.com wrote: mabshoff wrote: On Feb 17, 10:36 am, Johan Oudinet johan.oudi...@gmail.com wrote: Hi Michael, Hi Johan, SNIP I've just downloaded the Linux binaries from Sage website (the ubuntu-64bit-intel-xeon version) Sage Version 3.2.3, Release Date: 2009-01-05 Ok. The matrix is sparse and pre Sage 3.3 rank was computed using pari How can I get Sage 3.3? From the Sage website, I can only find the 3.2.3 version. Sage 3.3 isn't released yet, but there is another release candidate tonight, i.e. 3.3.rc2. Sage 3.3 it self should be out in the next 2, 3 days, but it has been slower than we had planned. which tends to blow up since it uses *a lot* of memory. We now switch back to computing the rank of such a matrix by using the much faster dense representation, but John Palmieri as the author of that code should fill you in on the details there. Actually, I plan to using this code for larger matrices (up to 10^4), so I don't think I could use a dense representation, do you? Well, you do multiplies AFAIK and that should destroy the sparse structure rather quickly assuming your matrix doesn't have a special structure. So, any ideas if the sparse structure is preserved? I'd appreciate any help. I am running the computation right now on a box with 128 GB, so we will see how far I get :) Right now we are in the 30th iteration of Wow! 128GB, it's very nice for doing such computations! Well, I didn't pay for it :) How can you know the number of iterations in a Sage script? Is there a debug mode, or something like that? I just added a print statement in the loops. If this all ended I didn't really want to see True or False at the end :) After about 60 minutes and maybe 80 iterations in rt I killed it consuming about 40GB of RAM. So something is going wrong. Two thoughts: * you are hitting a yet diagnosed memory leak - I will check that * since your matrix coefficients are rational they just explode - not much we can do about that. Using a ring with finite precision, i.e. RealField() might avoid that. * your sparse structure gets destroyed and you end up with dense matrices anyway, ergo bye bye free RAM Obviously it can be all three :) Since I'm just adding sparse vectors, I don't think the sparse structure is destroyed here. You do this: A = Ap * A which is matrix multiplication over QQ. That quickly leads to dense matrices with huge entries, which could simply use a lot of RAM. Yes, but for this matrix, the memory problem only occurs later, when I have a dxr matrix (T0) and try to get a square invertible matrix (T). And in the loop, there is only addition of sparse vectors, no matrix multiplication. But, as the computation works with a ring with finite precision (GF(997)), the problem should be on the coefficient explosion (when computing the rank) and/or a memory leak in the rank function applied to a sparse matrix over Rational field. while rt != d: while rt == rank(T.augment(matrix(d,1,{(i,0):1}))): i+=1 T=T.augment(matrix(d,1,{(i,0):1})) rt+=1 and we are already consuming about 2.5GB RAM. There are some known problem with LA in Sage that are leaky, but I suspect those are reference count issues in Cython. Cython 0.11 out soon should help there with the new reference count nanny. Well, my goal is to find a matrix B and a number n such that for every number kn, B*A^(k+1) == A^k with respect to A is a dxd sparse matrix over Rational field (actually A is an adjacency matrix of a finite directed graph). The algorithm I implemented works (at least for small matrix and where rank(A^k) 0), but it's not really optimized (I'm far from being an expert in linear algebra)! I'm interesting in a faster algorithm for both numerical and exact solutions. So, if someone knows a better solution (for example, a classical algorithm in linear algebra that solves this problem), I'll be glad to have some references ;-) Ok, I am not the guy who knows the literature well, so someone else needs to answer this. But there are plenty of people from graph theory around here. :) If you're willing, could you rephrase the problem in terms of directed graphs, if that is a natural way to look at it? Well, in terms of directed graphs, I have a graph where its vertices and edges are related to a recurrence relation as follows: V(0) = 1 (or could be 0 in a generalized version of my problem) and for each n 0: V(n+1) = \sum_{over the successors, V^\prime, of V} V^\prime(n) And I want to build a graph that its edges are labeled by rational numbers and that represents the inverse of the previous recurrence relation: V(N) = CN (a finite number) V(0) = 1, V(1) = C1, ..., V(k