[sage-support] Re: Memory overflow workaround?
Dear Daniel, On Nov 2, 5:12 pm, Daniel Allcock [EMAIL PROTECTED] wrote: Hi all, just got started with SAGE and I hope someone has a suggestion for me. I have a .sage file defining a big list of approx 170,000 4x4 matrices with rational number entries, which I will want SAGE to do various things to. It takes SAGE 4-5 minutes to read in the file (which was produced by a C++ program), and surely this can be improved. Of course, without seeing the code I have no clear idea why this takes so long and blows up the memory. But one remark: There are different ways to create a matrix over QQ, and they do not all take the same time. Examples: sage: timeit('M=Matrix([[1/2,2/3],[3/4,4/5]])') 625 loops, best of 3: 212 µs per loop sage: timeit('M=Matrix(QQ, 2,2);M[0,0]=1/2;M[0,1]=2/3;M[1,0]=3/4;M[1,1]=4/5') 625 loops, best of 3: 111 µs per loop sage: MS=MatrixSpace(QQ,2,2) sage: timeit('M=MS(1/2,2/3,3/4,4/5)') 625 loops, best of 3: 70.4 µs per loop Cheers Simon --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Variable for .sage/ ?
Dear team, I was told that when I produce a package that writes a lot of data into a folder tree such that (1) the user does not need to know where exactly the data are and (2) the data should be permanent, then I should put the folder tree into $HOME/.sage/ Is there a variable in Sage pointing to $HOME/.sage/? I mean, analogous to SAGE_ROOT or SAGE_TMP? Or should I infer the path from $HOME, i.e., from os.environ['HOME'] ? Or is it perhaps even better to put my folder tree into SAGE_DB, rather than directly into $HOME/.sage/ ? What else is SAGE_DB used for? Cheers Simon --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running sage on port 80 - is it possible?
Any port up to and including port 1000 requires root privileges to open on Linux (same on OSX and Unix by the way). So in order to work you either need to sudo or run Sage as root - both options I would highly discourage. Thank you. I will not run sage as root, of course :) Robert --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running sage on port 80 - is it possible?
Any port up to and including port 1000 requires root privileges to open on Linux (same on OSX and Unix by the way). So in order to work you either need to sudo or run Sage as root - both options I would highly discourage. Hm, it seems that http://www.sagenb.org/ runs on port 80 and the notebooks are not started under root. (I guess this from the fact that writing the port number 8000 in URL for sagenb is not necessary.) How can I do similar things? Robert --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Variable for .sage/ ?
Hi Simon, On Mon, Nov 3, 2008 at 3:37 AM, Simon King [EMAIL PROTECTED] wrote: Is there a variable in Sage pointing to $HOME/.sage/? I mean, analogous to SAGE_ROOT or SAGE_TMP? Or should I infer the path from $HOME, i.e., from os.environ['HOME'] ? The DOT_SAGE environment variable is what you're looking for. It is also at sage.misc.misc.DOT_SAGE. --Mike --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Variable for .sage/ ?
Thank you, Mike! Cheers Simon --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] After notebook is started, there's no command prompt
I have just fininshed upgrading to Sage 3.1.4 from Sage 2.8.15 in WinXP. When I double click on the Sage icon, I see a momemtary flash of a dos window, and then Firefox opens with a URL of http:// 192.168.80.128/home/admin/ and the Sage notebook appears. I have looked through the tutorials, and I do not see the command prompt that the tutorials mention on the notebook. What I see is two entries under active worksheets; 1) a 3d plot 2) demo. Since I have no idea of what to do next, I decided to ask. Just where is the Sage: command prompt? --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Memory overflow workaround?
Thank you Simon, I will try that. For those who are looking to reproduce my problem, the code is very very simple: load SPOCs.sage save (SPOC,'SPOCs.sobj') SPOCs.sage, approx 12MB, defines SPOC as a list of matrices. It is available at http://www.math.utexas.edu/~allcock/SPOCs.sage Thanks folks, Daniel On Nov 3, 2:16 am, Simon King [EMAIL PROTECTED] wrote: Dear Daniel, On Nov 2, 5:12 pm, Daniel Allcock [EMAIL PROTECTED] wrote: Hi all, just got started with SAGE and I hope someone has a suggestion for me. I have a .sage file defining a big list of approx 170,000 4x4 matrices with rational number entries, which I will want SAGE to do various things to. It takes SAGE 4-5 minutes to read in the file (which was produced by a C++ program), and surely this can be improved. Of course, without seeing the code I have no clear idea why this takes so long and blows up the memory. But one remark: There are different ways to create a matrix over QQ, and they do not all take the same time. Examples: sage: timeit('M=Matrix([[1/2,2/3],[3/4,4/5]])') 625 loops, best of 3: 212 µs per loop sage: timeit('M=Matrix(QQ, 2,2);M[0,0]=1/2;M[0,1]=2/3;M[1,0]=3/4;M[1,1]=4/5') 625 loops, best of 3: 111 µs per loop sage: MS=MatrixSpace(QQ,2,2) sage: timeit('M=MS(1/2,2/3,3/4,4/5)') 625 loops, best of 3: 70.4 µs per loop Cheers Simon --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Memory overflow workaround?
Thank you Simon, I will try that. For those who are looking to reproduce my problem, the code is very very simple: load SPOCs.sage save (SPOC,'SPOCs.sobj') SPOCs.sage, approx 12MB, defines SPOC as a list of matrices. It is available at http://www.math.utexas.edu/~allcock/SPOCs.sage Thanks folks, Daniel On Nov 3, 2:16 am, Simon King [EMAIL PROTECTED] wrote: Dear Daniel, On Nov 2, 5:12 pm, Daniel Allcock [EMAIL PROTECTED] wrote: Hi all, just got started with SAGE and I hope someone has a suggestion for me. I have a .sage file defining a big list of approx 170,000 4x4 matrices with rational number entries, which I will want SAGE to do various things to. It takes SAGE 4-5 minutes to read in the file (which was produced by a C++ program), and surely this can be improved. Of course, without seeing the code I have no clear idea why this takes so long and blows up the memory. But one remark: There are different ways to create a matrix over QQ, and they do not all take the same time. Examples: sage: timeit('M=Matrix([[1/2,2/3],[3/4,4/5]])') 625 loops, best of 3: 212 µs per loop sage: timeit('M=Matrix(QQ, 2,2);M[0,0]=1/2;M[0,1]=2/3;M[1,0]=3/4;M[1,1]=4/5') 625 loops, best of 3: 111 µs per loop sage: MS=MatrixSpace(QQ,2,2) sage: timeit('M=MS(1/2,2/3,3/4,4/5)') 625 loops, best of 3: 70.4 µs per loop Cheers Simon --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Memory overflow workaround?
Does this help you: Suppose (for a toy example) I have defined a Python function like this: sage: def f(M): : d = M.det() : return d And I have a file called testin.sage containing a large number of lines like this: [[1,2],[3,4]] [[5,6],[7,8]] [[1,2],[3,4]] [[5,6],[7,8]] [[1,2],[3,4]] [[5,6],[7,8]] Then from the command line I can do this: sage: for l in open(/home/masgaj/testin.sage): print(f(Matrix(eval(l and what I see is this: -2 -2 -2 -2 -2 -2 As far as I know Python only reads the lines in the file one at at time, and returns each as a string (hence the eval()), which you can do what you like with. I did something similar when I wanted to process a million elliptic curves without reading them all in at once. John 2008/11/2 Daniel Allcock [EMAIL PROTECTED]: Hi all, just got started with SAGE and I hope someone has a suggestion for me. I have a .sage file defining a big list of approx 170,000 4x4 matrices with rational number entries, which I will want SAGE to do various things to. It takes SAGE 4-5 minutes to read in the file (which was produced by a C++ program), and surely this can be improved. I assumed that loading it into memory and then writing it to a .sobj file would give me something more manageable. But I get memory allocation errors: python(2102) malloc: *** vm_allocate(size=8421376) failed (error code=3) python(2102) malloc: *** error: can't allocate region python(2102) malloc: *** set a breakpoint in szone_error to debug Presumably the system has just run out of memory. This surprises me since the .sage file is only 12MB, and the .py file it creates is 37MB. The matrix entries are all small, numerators 10,000 and denominators 200 or so. I'm working on a MacBook Pro with 2GB RAM, and the machine didn't have any other substantial load. I will need only one matrix at a time, so there should be no need to load in all of them at once. But poking around in SAGE and python docs hasn't shown me any simple way to, say, read in and execute a single line from some file. Thanks for your help, Daniel --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage 3.1.4 ...can't get notebook to run...
William, I went to Devices and then Network Adapter and changed the setting from NAT to bridged and the intial command notebook now works. I assune this means Sage notebooks will only work if I am connected to my router. The !ifconfig showed I had a ip address of 127.0.0.1 which clearly did not work. I am still suprised that the command line version of sage graphics commands don't work. Thanks for your help. Mike On Nov 2, 4:08 pm, William Stein [EMAIL PROTECTED] wrote: On Sun, Nov 2, 2008 at 2:37 PM, [EMAIL PROTECTED] wrote: William, Sorry having problems first I can't seem to cut and past from VMware to windows The screen looks like. Welcome to Sage:http://www.sagemath.org Type one of the following. notebook -- start the Sage notebook server off -- turn this machine off manage --- ect sage -- run the sage command line sage login: If I type notebook it just reprints the above message. It does not seem to start a server. Do I need to set an option in VMplayer? This sounds very much like unfortnately the sage-vmware image that we posted is completely broken. I check if this is the case tomorrow when I go to my office (actually, I will also check at home, which will take an hour or two). I recommend that you use http://sagenb.org until then or do the following: login: sage at the sage prompt type sage: !ifconfig In the output there should be a line that looks like this: eth0 Link encap:Ethernet HWaddr 00:0c:29:ed:81:58 inet addr:192.168.243.129 Bcast:192.168.243.255 Mask:255.255.255.0 If not, then the problem is with your vmware player setup and windows. If there is such a line, do this: sage: notebook(address=192.168.243.129) where the number in quotes is after inet addr. Then try using Sage via a browser from windows. -- William My second point was that I can run the tutorial from the Sage command line. However, if I try show or plot from the command line version of sage I get no graphics. I also tried to run notebook from the command line sage, and It did not work. As you pointed it without the server running in vmplayer it should not have worked. So I think I have two questions. 1. Why does the notebook command not work from the above screen? Do I need to set up network connections options in VMplayer? 2. Should I be able to run graphics from the command line version of sage? Thanks Mike On Nov 2, 2:04 pm, William Stein [EMAIL PROTECTED] wrote: On Sun, Nov 2, 2008 at 1:40 PM, [EMAIL PROTECTED] wrote: I have installed VMplayer and sage-vmware-3.1.4 on a windows XP notebook. I start it with sage_vm. I then get sage login: . If I type notebook I get the start up screen again telling me to type notebook, sage ect.. I can start sage, and it runs however, I can not plot. Just to clarify, you can use the sage notebook fine from windows, e.g., to do arithmetic, and the one problem is I can not plot? Could you be dramatically more precise in describing what you mean by I can not plot? E.g., post a screen shot. Thanks. From within Sage if t I type notebook() it runs a series of command that end with http://localhost:8000/?startup_token=a80b60aa4d.:nosuch file or directory from windows I can not connect tohttp://localhost:8000/ That should definitely *not* work from windows. Only typing sage: notebook at the login prompt makes it so that the notebook starts a server that can be used from windows. From within sage you could do sage: notebook(address=whatever.the.address.was.above.when.you.typed.notebook.at.the.sage.prompt) Cheers, William -- William Stein Associate Professor of Mathematics University of Washingtonhttp://wstein.org- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage 3.1.4 ...can't get notebook to run...
On Mon, Nov 3, 2008 at 9:23 AM, [EMAIL PROTECTED] wrote: William, I went to Devices and then Network Adapter and changed the setting from NAT to bridged and the intial command notebook now works. I assune this means Sage notebooks will only work if I am connected to my router. NAT should work, but obviously doesn't for you for some reason. This is unfortunately a VMware/Windows problem, so there isn't much I can suggest. I'm glad bridged works for you. The !ifconfig showed I had a ip address of 127.0.0.1 which clearly did not work. Yes, that means that you *only* had the localhost network, not the one that you should get via NAT. I am still suprised that the command line version of sage graphics commands don't work. Thanks for your help. Mike It is a command line in a virtual machine. It tried to pop up the graphics in the virtual machine, which can't work, since the virtual machine doesn't have any graphical user interface installed. I'm probably going to release a vmware image soon that has a graphical interface installed into it, but still need to work on making the vmware image use less disk space. Anyway, sorry for all this trouble. There is work going on to have a native version of Sage for windows that doesn't require vmware at all, but that isn't here yet. -- William On Nov 2, 4:08 pm, William Stein [EMAIL PROTECTED] wrote: On Sun, Nov 2, 2008 at 2:37 PM, [EMAIL PROTECTED] wrote: William, Sorry having problems first I can't seem to cut and past from VMware to windows The screen looks like. Welcome to Sage:http://www.sagemath.org Type one of the following. notebook -- start the Sage notebook server off -- turn this machine off manage --- ect sage -- run the sage command line sage login: If I type notebook it just reprints the above message. It does not seem to start a server. Do I need to set an option in VMplayer? This sounds very much like unfortnately the sage-vmware image that we posted is completely broken. I check if this is the case tomorrow when I go to my office (actually, I will also check at home, which will take an hour or two). I recommend that you use http://sagenb.org until then or do the following: login: sage at the sage prompt type sage: !ifconfig In the output there should be a line that looks like this: eth0 Link encap:Ethernet HWaddr 00:0c:29:ed:81:58 inet addr:192.168.243.129 Bcast:192.168.243.255 Mask:255.255.255.0 If not, then the problem is with your vmware player setup and windows. If there is such a line, do this: sage: notebook(address=192.168.243.129) where the number in quotes is after inet addr. Then try using Sage via a browser from windows. -- William My second point was that I can run the tutorial from the Sage command line. However, if I try show or plot from the command line version of sage I get no graphics. I also tried to run notebook from the command line sage, and It did not work. As you pointed it without the server running in vmplayer it should not have worked. So I think I have two questions. 1. Why does the notebook command not work from the above screen? Do I need to set up network connections options in VMplayer? 2. Should I be able to run graphics from the command line version of sage? Thanks Mike On Nov 2, 2:04 pm, William Stein [EMAIL PROTECTED] wrote: On Sun, Nov 2, 2008 at 1:40 PM, [EMAIL PROTECTED] wrote: I have installed VMplayer and sage-vmware-3.1.4 on a windows XP notebook. I start it with sage_vm. I then get sage login: . If I type notebook I get the start up screen again telling me to type notebook, sage ect.. I can start sage, and it runs however, I can not plot. Just to clarify, you can use the sage notebook fine from windows, e.g., to do arithmetic, and the one problem is I can not plot?Could you be dramatically more precise in describing what you mean by I can not plot? E.g., post a screen shot. Thanks. From within Sage if t I type notebook() it runs a series of command that end with http://localhost:8000/?startup_token=a80b60aa4d.:nosuch file or directory from windows I can not connect tohttp://localhost:8000/ That should definitely *not* work from windows. Only typing sage: notebook at the login prompt makes it so that the notebook starts a server that can be used from windows.From within sage you could do sage: notebook(address=whatever.the.address.was.above.when.you.typed.notebook.at.the.sage.prompt) Cheers, William -- William Stein Associate Professor of Mathematics University of Washingtonhttp://wstein.org- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~
[sage-support] Re: Memory overflow workaround?
On Nov 3, 9:13 am, John Cremona [EMAIL PROTECTED] wrote: Does this help you: Suppose (for a toy example) I have defined a Python function like this: sage: def f(M): : d = M.det() : return d And I have a file called testin.sage containing a large number of lines like this: [[1,2],[3,4]] [[5,6],[7,8]] [[1,2],[3,4]] [[5,6],[7,8]] [[1,2],[3,4]] [[5,6],[7,8]] Then from the command line I can do this: sage: for l in open(/home/masgaj/testin.sage): print(f(Matrix(eval(l and what I see is this: -2 -2 -2 -2 -2 -2 As far as I know Python only reads the lines in the file one at at time, and returns each as a string (hence the eval()), which you can do what you like with. I did something similar when I wanted to process a million elliptic curves without reading them all in at once. John Yep, the load is the expensive operation: [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.1.3.final$ ./sage -- | Sage Version 3.2.alpha2, Release Date: 2008-10-31 | | Type notebook() for the GUI, and license() for information.| -- sage: time load SPOCs.sage CPU times: user 67.46 s, sys: 8.94 s, total: 76.40 s Wall time: 76.59 s sage: get_memory_usage() 3700.5625 sage: time save (SPOC,'SPOCs.sobj') CPU times: user 17.63 s, sys: 0.08 s, total: 17.71 s Wall time: 17.71 s sage: get_memory_usage() 3700.5625 sage: Exiting SAGE (CPU time 7m27.07s, Wall time 18m2.26s). [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.1.3.final$ ./sage -- | Sage Version 3.2.alpha2, Release Date: 2008-10-31 | | Type notebook() for the GUI, and license() for information.| -- sage: time load('SPOCs.sobj') CPU times: user 7.10 s, sys: 0.60 s, total: 7.70 s Wall time: 7.70 s What is off is that according to top the load operation took about 600 seconds CPU time, so where is the time going? Cheers, Michael --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Memory overflow workaround?
On Nov 3, 9:35 am, mabshoff [EMAIL PROTECTED] dortmund.de wrote: On Nov 3, 9:13 am, John Cremona [EMAIL PROTECTED] wrote: Does this help you: Suppose (for a toy example) I have defined a Python function like this: sage: def f(M): : d = M.det() : return d And I have a file called testin.sage containing a large number of lines like this: [[1,2],[3,4]] [[5,6],[7,8]] [[1,2],[3,4]] [[5,6],[7,8]] [[1,2],[3,4]] [[5,6],[7,8]] Then from the command line I can do this: sage: for l in open(/home/masgaj/testin.sage): print(f(Matrix(eval(l and what I see is this: -2 -2 -2 -2 -2 -2 As far as I know Python only reads the lines in the file one at at time, and returns each as a string (hence the eval()), which you can do what you like with. I did something similar when I wanted to process a million elliptic curves without reading them all in at once. John Yep, the load is the expensive operation: [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.1.3.final$ ./sage -- | Sage Version 3.2.alpha2, Release Date: 2008-10-31 | | Type notebook() for the GUI, and license() for information. | -- sage: time load SPOCs.sage CPU times: user 67.46 s, sys: 8.94 s, total: 76.40 s Wall time: 76.59 s sage: get_memory_usage() 3700.5625 sage: time save (SPOC,'SPOCs.sobj') CPU times: user 17.63 s, sys: 0.08 s, total: 17.71 s Wall time: 17.71 s sage: get_memory_usage() 3700.5625 sage: Exiting SAGE (CPU time 7m27.07s, Wall time 18m2.26s). [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.1.3.final$ ./sage -- | Sage Version 3.2.alpha2, Release Date: 2008-10-31 | | Type notebook() for the GUI, and license() for information. | -- sage: time load('SPOCs.sobj') CPU times: user 7.10 s, sys: 0.60 s, total: 7.70 s Wall time: 7.70 s What is off is that according to top the load operation took about 600 seconds CPU time, so where is the time going? Since the above is ambiguous I meant the first load, i.e. the time load SPOCs.sage. When one does load the SPOCs.sobj one should also assign the result to some variable to be not treated to all the matrixes just read in scrolling by on the scree :) Cheers, Michael --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: After notebook is started, there's no command prompt
There are two ways to use Sage, via the notebook or via a command prompt. Which is better depends on personal preference, but I don't think they can be used at the same time (without starting a new copy of Sage), as the prompt console is used by the notebook server. To get the prompt, one should type something other than notebook when the virtual machine starts up. However, especially from Windows, it's probably easier to use the notebook. Click on new worksheet and a blank worksheet will come up. There is a box where you can type input, and hit shift-enter (or click on the evaluate link) to run it. (The first time may take a couple of seconds as it's starting up sage in the background at that point). I believe most of this is discussed in the tutorial, which is a very good place to look. - Robert On Nov 2, 2008, at 9:22 PM, systemwizard wrote: I have just fininshed upgrading to Sage 3.1.4 from Sage 2.8.15 in WinXP. When I double click on the Sage icon, I see a momemtary flash of a dos window, and then Firefox opens with a URL of http:// 192.168.80.128/home/admin/ and the Sage notebook appears. I have looked through the tutorials, and I do not see the command prompt that the tutorials mention on the notebook. What I see is two entries under active worksheets; 1) a 3d plot 2) demo. Since I have no idea of what to do next, I decided to ask. Just where is the Sage: command prompt? --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running sage on port 80 - is it possible?
On Nov 3, 3:10 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear sage gurus, I am trying to run sage on port 80 instead of default 8000 (I have a virtual server with sage for our PC lab which is behind firewall and we cannot forward ports 8000) apache, which has default 80 is at 81 or not running. If I start notebook by notebook(address='', port=8000, accounts=True) notebook starts, but when trying notebook(address='', port=80, accounts=True) I get the following error (se below) The same if I try ports like 800, 98 etc. On the other hand, ports like 8001 or 8005 work fine. I think that the problem is with permissions. Is there any chance to run sage under user account on port 80? Any port up to and including port 1000 requires root privileges to open on Linux (same on OSX and Unix by the way). So in order to work you either need to sudo or run Sage as root - both options I would highly discourage. Thank you. Robert Marik. Cheers, Michael --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: !
On Nov 2, 2008, at 12:02 PM, William Stein wrote: On Sun, Nov 2, 2008 at 11:58 AM, Kevin Buzzard [EMAIL PROTECTED] wrote: That would be inconsistent with the choice made by every other math software system ever written and with common mathematical usage as well. It would thus cause excessive confusion, and likely not be very useful. I can believe this. And yet if there's an IsPositive command in sage, what does IsPositive(Sqrt(5)) give? There is no IsPositive (or is_positive) command in Sage. If there were it would definitely give True because sage: float(sqrt(5)) 2.2360679774997898 I think that my main problem is that I am not used to maths packages that think sqrt(5) is anything other than a positive real. Sage does think it is a positive real. You're used to math packages like Pari and Magma that both think sqrt(5) is a positive rational, by which I somewhat sarcastically mean a finite-precision floating point number. Also, I bet you're also used to Magma, which thinks of sqrt(5) alternatively as a number field element which doesn't have a choice of sign. In Sage, sqrt(5) is the exact positive sqrt of 5. sage: a = sqrt(5) sage: a sqrt(5) sage: a^2 5 sage: expand((a+1)^2) 2*sqrt(5) + 6 sage: float(a) 2.2360679774997898 sage: numerical_approx(a, digits=40) 2.236067977499789696409173668731276235441 sage: QQ[a] Number Field in sqrt5 with defining polynomial x^2 - 5 Actually, at the point when I do QQ[a] and get a number field, a looses the choice of sign. That's changing in the next version of Sage though, due to work of Robert Bradshaw. Assuming somebody reviews that patch of course (hint, hint :). There's also a faster SR minpoly patch up as well, which should help here a lot. - Robert --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: new user: latex fails
If anyone else comes across this problem and installing gs and imagemagick does not solve it, I also had to install tetex-extra. I realized when I was getting the error: fullpage.sty could not be found. Thanks, -Matthew J --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Porting Sage to AIX
Michael, William, Here is an update on AIX. I found why sage startup was crashing in real_mpfi.so. I rebuilt libmpfi.so and recompiled real_mpfi.pyx and complex_double.pyx. The illegal instruction error was due to an error in building libmpfi.so caused by arguments given by libtool. By testing with the supplied testcases I was able to narrow it down. Also, for the list, I edited sage/rings/polynomial/ mult_polynomial_libsingular.pyx and replaced the arguments to dlopen call to handle = dlopen(lib, 65536+4); It was using 256+1 earlier (RTLD_GLOBAL | RTLD_LAZY). These values are defined differently in AIX's dlfcn.h as shown above. Now I am running into another error: /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/matrix/matrix_space.py(38)module() - import matrix_modn_dense (Pdb) s --Call-- /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/linbox/__init__.py(1)module() (Pdb) s /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/linbox/__init__.py(1)module() (Pdb) s --Return-- /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/linbox/__init__.py(1)module()-None (Pdb) s /usr/local/PET/src/build/sage-3.1.1/local/bin/sage-sage: line 226: 28756 Illegal instruction (core dumped) sage-ipython $@ -c $SAGE_STARTUP_COMMAND; I checked the __init__.py file and it has 0 bytes: ls -lt /usr/local/ PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/ linbox/__init__.py -rw-r-1 sameer 0 Dec 20 2007 /usr/local/PET/ src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/ linbox/__init__.py Is this normal? I think there may be another library (linbox) that probably needs to be rebuilt, but what I was wondering if this null init.py file is designed to be this way or if it is just an error in my installation. I think the illegal instruction probably points to an incorrectly installed liblinbox.so on which linbox.so is based, but I thought I would check with you. Thanks! - Sameer On Oct 28, 3:19 pm, Sameer [EMAIL PROTECTED] wrote: Michael, William, Thank you so much for the suggestions. I will re-install pexpect and see if it helps. Yes, I am getting closer to the end (~60-70 packages built) but without pexpect/gap it is difficult to get sage to boot up. I will meet and speak to Jose this week and request that you get accounts on their IBM AIX and Linux system. There may be some delay due to the paperwork involved, but it would be great if we can add support for these systems in the sage repository. I have also ported sage to ppc64 Linux at their center. I will keep you posted on the progress on AIX. Thanks! - Sameer On Oct 28, 4:21 am, mabshoff [EMAIL PROTECTED] dortmund.de wrote: On Oct 27, 10:42 pm, William Stein [EMAIL PROTECTED] wrote: On Mon, Oct 27, 2008 at 9:15 PM, Sameer [EMAIL PROTECTED] wrote: Hi, I am trying to port sage 3.1.1 to an IBM Power5 AIX system. After I install gap (in 32 bits), I get: So how far did you get building Sage? If GAP is the problem it sounds like you get next to the end. From the error messages above it also seems like it could be a pexpect issue. If GAP by itself starts up cleanly I would assume that the problem is in pexpect. Just out of curiosity, is this a machine you could give some (any?) of the Sage developers accounts on? We would love to officially support AIX. So far, none of us have ever been able to get access to an AIX box. +1 William Cheers, Michael --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Porting Sage to AIX
On Nov 3, 6:39 pm, Sameer [EMAIL PROTECTED] wrote: Michael, William, Hi Sameer, good that we are back on the list again. Here is an update on AIX. I found why sage startup was crashing in real_mpfi.so. I rebuilt libmpfi.so and recompiled real_mpfi.pyx and complex_double.pyx. The illegal instruction error was due to an error in building libmpfi.so caused by arguments given by libtool. By testing with the supplied testcases I was able to narrow it down. Ok, can you give some details what had to be changed? Also, for the list, I edited sage/rings/polynomial/ mult_polynomial_libsingular.pyx and replaced the arguments to dlopen call to handle = dlopen(lib, 65536+4); It was using 256+1 earlier (RTLD_GLOBAL | RTLD_LAZY). These values are defined differently in AIX's dlfcn.h as shown above. This will be fixed in Sage 3.2 and a patch is at http://trac.sagemath.org/sage_trac/ticket/4427 Now I am running into another error: /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ matrix/matrix_space.py(38)module() - import matrix_modn_dense (Pdb) s --Call-- /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ libs/linbox/__init__.py(1)module() (Pdb) s /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ libs/linbox/__init__.py(1)module() (Pdb) s --Return-- /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ libs/linbox/__init__.py(1)module()-None (Pdb) s /usr/local/PET/src/build/sage-3.1.1/local/bin/sage-sage: line 226: 28756 Illegal instruction (core dumped) sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Ok, that could be the BLAS or something in LinBox itself. How did you build ATLAS? I checked the __init__.py file and it has 0 bytes: ls -lt /usr/local/ PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/ linbox/__init__.py -rw-r- 1 sameer 0 Dec 20 2007 /usr/local/PET/ src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/ linbox/__init__.py Is this normal? That should be ok, all that is required is that file to exist IRC. I think there may be another library (linbox) that probably needs to be rebuilt, but what I was wondering if this null init.py file is designed to be this way or if it is just an error in my installation. I think the illegal instruction probably points to an incorrectly installed liblinbox.so on which linbox.so is based, but I thought I would check with you. You should get a svn checkout of LinBox and run make check - in Sage we patch the commentator and that breaks make check. Should LinBox pass its make check we can keep on digging. Thanks! - Sameer Cheers, Michael --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Porting Sage to AIX
Hi Michael, Here is an update on AIX. I found why sage startup was crashing in real_mpfi.so. I rebuilt libmpfi.so and recompiled real_mpfi.pyx and complex_double.pyx. The illegal instruction error was due to an error in building libmpfi.so caused by arguments given by libtool. By testing with the supplied testcases I was able to narrow it down. Ok, can you give some details what had to be changed? I just did a manual: % cd spkg/build; cp -r mpfi* mympfi (the package builds without error and deletes the sources, so it is important to copy it midway while it is building); % cd mympfi; make; % gcc -shared -o libmpfi.so ../src/.libs/*.o -L/usr/local/PET/src/ build/sage-3.1.1/local/lib -lmpfr -lgmp cp libmpfi $SAGE_LOCAL/lib and tested with the tests/test_mpfi to make sure it didn't crash with the illegal instruction. Also, for the list, I edited sage/rings/polynomial/ mult_polynomial_libsingular.pyx and replaced the arguments to dlopen call to handle = dlopen(lib, 65536+4); It was using 256+1 earlier (RTLD_GLOBAL | RTLD_LAZY). These values are defined differently in AIX's dlfcn.h as shown above. This will be fixed in Sage 3.2 and a patch is athttp://trac.sagemath.org/sage_trac/ticket/4427 Now I am running into another error: /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ matrix/matrix_space.py(38)module() - import matrix_modn_dense (Pdb) s --Call-- /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ libs/linbox/__init__.py(1)module() (Pdb) s /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ libs/linbox/__init__.py(1)module() (Pdb) s --Return-- /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/ libs/linbox/__init__.py(1)module()-None (Pdb) s /usr/local/PET/src/build/sage-3.1.1/local/bin/sage-sage: line 226: 28756 Illegal instruction (core dumped) sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Ok, that could be the BLAS or something in LinBox itself. How did you build ATLAS? I checked the __init__.py file and it has 0 bytes: ls -lt /usr/local/ PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/ linbox/__init__.py -rw-r- 1 sameer 0 Dec 20 2007 /usr/local/PET/ src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/libs/ linbox/__init__.py Is this normal? That should be ok, all that is required is that file to exist IRC. I think there may be another library (linbox) that probably needs to be rebuilt, but what I was wondering if this null init.py file is designed to be this way or if it is just an error in my installation. I think the illegal instruction probably points to an incorrectly installed liblinbox.so on which linbox.so is based, but I thought I would check with you. You should get a svn checkout of LinBox and run make check - in Sage we patch the commentator and that breaks make check. Should LinBox pass its make check we can keep on digging. Thanks I will rebuild it! - Sameer --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Porting Sage to AIX
On Nov 3, 7:04 pm, Sameer [EMAIL PROTECTED] wrote: Hi Michael, Here is an update on AIX. I found why sage startup was crashing in real_mpfi.so. I rebuilt libmpfi.so and recompiled real_mpfi.pyx and complex_double.pyx. The illegal instruction error was due to an error in building libmpfi.so caused by arguments given by libtool. By testing with the supplied testcases I was able to narrow it down. Ok, can you give some details what had to be changed? I just did a manual: % cd spkg/build; cp -r mpfi* mympfi (the package builds without error and deletes the sources, so it is important to copy it midway while it is building); Yes. Just run ./sage -sh, then cd into spkg/standard, tar xjf foo.spkg, cd into foo and run ./spkg-install. % cd mympfi; make; % gcc -shared -o libmpfi.so ../src/.libs/*.o -L/usr/local/PET/src/ build/sage-3.1.1/local/lib -lmpfr -lgmp cp libmpfi $SAGE_LOCAL/lib and tested with the tests/test_mpfi to make sure it didn't crash with the illegal instruction. Ok, but why would a static library crash? SNIP Thanks I will rebuild it! - Sameer Cheers, Michael --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: new user: latex fails
On Mon, Nov 3, 2008 at 5:23 PM, Matthew J [EMAIL PROTECTED] wrote: If anyone else comes across this problem and installing gs and imagemagick does not solve it, I also had to install tetex-extra. I realized when I was getting the error: fullpage.sty could not be found. Thanks. Maybe we should get rid of dependence on fullpage.sty, since probably there is an easy direct way to do about the same thing. 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: new user: latex fails
This should do something pretty close: %% margins \oddsidemargin 0.0in \evensidemargin 0.0in \textwidth 6.45in \topmargin 0.0in \headheight 0.0in \headsep0.0in \textheight 9.0in -cc On Mon, Nov 3, 2008 at 7:57 PM, William Stein [EMAIL PROTECTED] wrote: On Mon, Nov 3, 2008 at 5:23 PM, Matthew J [EMAIL PROTECTED] wrote: If anyone else comes across this problem and installing gs and imagemagick does not solve it, I also had to install tetex-extra. I realized when I was getting the error: fullpage.sty could not be found. Thanks. Maybe we should get rid of dependence on fullpage.sty, since probably there is an easy direct way to do about the same thing. 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: new user: latex fails
On Mon, Nov 3, 2008 at 8:42 PM, Craig Citro [EMAIL PROTECTED] wrote: This should do something pretty close: %% margins \oddsidemargin 0.0in \evensidemargin 0.0in \textwidth 6.45in \topmargin 0.0in \headheight 0.0in \headsep0.0in \textheight 9.0in -cc Thanks. I've made this #4435. http://trac.sagemath.org/sage_trac/ticket/4435 --~--~-~--~~~---~--~~ 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://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Porting Sage to AIX
Michael, An update. I rebuilt liblinboxsage.a by omiting Communicator.o and using a simple g++ -shared -o command that tied in the .o files. I think the crash occured at Communicator.c but I saw a - DDISABLE_COMMUNICATOR. So, I rebuilt the .a file and then it loaded properly until the next crash. The earlier crashes were linked to the first instance of a routine not executing properly due to a shared object that was not built properly. Now I am facing another kind of error where the same routine executes correctly a few times and then crashes at return sage.rings.rational.Rational(x, base) in rational_field.py. I modified it: (Pdb) c rational_field.py: SSS: after crash myretval = 1 rational_field.py: SSS: before crash, x = 1 base = 0 /usr/local/PET/src/build/sage-3.1.1/local/lib/python2.5/site-packages/sage/rings/rational_field.py(221)__call__() - myretval = sage.rings.rational.Rational(x, base) (Pdb) s Unhandled SIGSEGV: A segmentation fault occured in SAGE. This probably occured because a *compiled* component of SAGE has a bug in it (typically accessing invalid memory) or is not properly wrapped with _sig_on, _sig_off. You might want to run SAGE under gdb with 'sage -gdb' to debug this. But the output suggests that it works properly some times: ./sage args = , sage_startup_cmd = , import sage.misc.misc; print sage.misc.misc.branch_current_hg_notice(sage.misc.misc.branch_current_hg()); from sage.misc.interpreter import preparser; preparser(True);import sage.all_cmdline; sage.all_cmdline._init_cmdline(globals());from sage.all import Integer, RealNumber;import os; os.chdir(/usr/local/ PET/src/build/sage-3.1.1);import sage.misc.interpreter;from sage.misc.interpreter import attached_files;from sage.all_cmdline import *;_=sage.misc.interpreter.load_startup_file(/Dev_users/ sameer/.sage//init.sage) -- | SAGE Version 3.1.1, Release Date: 2008-08-17 | | Type notebook() for the GUI, and license() for information.| -- real_mpfi: after __init__ real_mpfi: after __init__ real_mpfi: after __init__ real_mpfi: after __init__ rational_field.py: SSS: before crash, x = 0 base = 0 rational_field.py: SSS: after crash myretval = 0 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 rational_field.py: SSS: before crash, x = 0 base = 0 rational_field.py: SSS: after crash myretval = 0 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 0.? e-21 real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 1.? real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 0.? e-21 real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 1.? real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 0.? e-21 real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 1.? real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 0.? e-21 real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = -1.? real_mpfi: after __init__ rational_field.py: SSS: before crash, x = 0 base = 0 rational_field.py: SSS: after crash myretval = 0 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 rational_field.py: SSS: before crash, x = 0 base = 0 rational_field.py: SSS: after crash myretval = 0 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 real_mpfi: after __init__ rational_field.py: SSS: before crash, x = 0 base = 0 rational_field.py: SSS: after crash myretval = 0 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 real_mpfi: after __init__ qqbar.py: SSS: After self._descr._interval_fast : self._value = 0.? e-21 rational_field.py: SSS: before crash, x = -1 base = 0 rational_field.py: SSS: after crash myretval = -1 rational_field.py: SSS: before crash, x = 0 base = 0 rational_field.py: SSS: after crash myretval = 0 rational_field.py: SSS: before crash, x = 1 base = 0 rational_field.py: SSS: after crash myretval = 1 rational_field.py: SSS: before crash, x = 1 base = 0