[sage-support] Re: Integral problems
On Sep 13, 2:35 am, Jason Merrill [EMAIL PROTECTED] wrote: On Sep 12, 4:48 pm, Sand Wraith [EMAIL PROTECTED] wrote: Hi all! Help please again :-) here is worksheet describes my problem: http://75.75.6.176/home/pub/8/ so, at the last stem i have wrong result: 0 instead of 2/3. what i am doing wrong? It looks like there are a few problems here, but the main thing is that when you call myrect(x), it just returns 0. def rect(tau=0,t=0): if (t==tau) or (t==-tau): return 0.5 elif (t-tau) and (ttau): return 1 else: return 0; def myrect(x): return rect(1,x); sage: myrect(x) 0 The reason is that when you compare a symbolic variable, x, to a number, 1, and force sage to come up with a True or False answer, as if and elif do, the answer is basically always False. sage: bool(x == 1) False sage: bool(x 1) False sage: bool(x 1) False sage: bool(x -1) False etc. Because of this, when you call myrect(x), things fall down to the last branch of your definition. When an expression appears as an argument to a function, it is evaluated *before* the function is called. For instance, look at sage: plot(myrect(x),(x,-3,3)) # The line segment y == 0 In this case, myrect(x) evaluates to 0 *before* plot has a chance to pass in any values, and the same thing is happening to integral. I'd like to tell you that you can do what you want using piecewise, or something like that, but actually I don't see any way at all to make integral, which needs something that can act like a SymbolicExpression as its first argument, do what you want. Maybe someone else will know. Regards, JM I have redefine rect function: rect=Piecewise([ [(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:1)], [( 1, 10),(lambda x:0)] ]); and i have another two questions: 1) rect.plot() - is it the only way of plotting? i'd like to use plot(rect,-4,4), but it leads to error: verbose 0 (3729: plot.py, __call__) there were 4 extra arguments (besides function lambda at 0xa9382cc) Traceback (click to the left for traceback) ... UnboundLocalError: local variable 'G' referenced before assignment 2)How can i define another function like rect*f(x) ? and plot it? --~--~-~--~~~---~--~~ 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: Integral problems
On Mon, Sep 15, 2008 at 11:10 AM, Sand Wraith [EMAIL PROTECTED] wrote: On Sep 13, 2:35 am, Jason Merrill [EMAIL PROTECTED] wrote: On Sep 12, 4:48 pm, Sand Wraith [EMAIL PROTECTED] wrote: Hi all! Help please again :-) here is worksheet describes my problem: http://75.75.6.176/home/pub/8/ so, at the last stem i have wrong result: 0 instead of 2/3. what i am doing wrong? It looks like there are a few problems here, but the main thing is that when you call myrect(x), it just returns 0. def rect(tau=0,t=0): if (t==tau) or (t==-tau): return 0.5 elif (t-tau) and (ttau): return 1 else: return 0; def myrect(x): return rect(1,x); sage: myrect(x) 0 The reason is that when you compare a symbolic variable, x, to a number, 1, and force sage to come up with a True or False answer, as if and elif do, the answer is basically always False. sage: bool(x == 1) False sage: bool(x 1) False sage: bool(x 1) False sage: bool(x -1) False etc. Because of this, when you call myrect(x), things fall down to the last branch of your definition. When an expression appears as an argument to a function, it is evaluated *before* the function is called. For instance, look at sage: plot(myrect(x),(x,-3,3)) # The line segment y == 0 In this case, myrect(x) evaluates to 0 *before* plot has a chance to pass in any values, and the same thing is happening to integral. I'd like to tell you that you can do what you want using piecewise, or something like that, but actually I don't see any way at all to make integral, which needs something that can act like a SymbolicExpression as its first argument, do what you want. Maybe someone else will know. Regards, JM I have redefine rect function: rect=Piecewise([ [(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:1)], [( 1, 10),(lambda x:0)] ]); and i have another two questions: 1) rect.plot() - is it the only way of plotting? i'd like to use Yes, this is the only way to plot rect at the moment. plot(rect,-4,4), but it leads to error: verbose 0 (3729: plot.py, __call__) there were 4 extra arguments (besides function lambda at 0xa9382cc) Traceback (click to the left for traceback) ... UnboundLocalError: local variable 'G' referenced before assignment 2)How can i define another function like rect*f(x) ? and plot it? For some reason, * is not working. You can just redefine your function: for example, rect2 = Piecewise([[(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:sin(x))], [( 1, 10),(lambda x:0)]]) --~--~-~--~~~---~--~~ 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: jsmath typesetting for sqrt, sin, etc.
hjuergens wrote: Using SAGE 3.1.1 notebook GUI in Safari 3.1.2 on Mac OS X var ('x') f = 1/sqrt(x) jsmath(f) produces the output\frac{1}{\sqrt{ x }} and does no typesetting while var ('x') g = 1/x^2 jsmath(g) produces nice typset of that formular. A data point: on Firefox 3.0.1, Ubuntu 8.04 32-bit, both examples above produce typeset output. Do you have the jsmath TeX fonts installed? Click on the jsmath icon at the bottom of the page and check to see if it says jsMath v3.5 (TeX fonts). If it doesn't, that may be the problem. If you don't have the tex fonts, you might go to http://www.math.union.edu/~dpvc/jsMath/download/jsMath-fonts.html and download them and install them on your computer. Thanks, Jason --~--~-~--~~~---~--~~ 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] jsmath typesetting for sqrt, sin, etc.
Using SAGE 3.1.1 notebook GUI in Safari 3.1.2 on Mac OS X var ('x') f = 1/sqrt(x) jsmath(f) produces the output\frac{1}{\sqrt{ x }} and does no typesetting while var ('x') g = 1/x^2 jsmath(g) produces nice typset of that formular. As soon as sqrt, sin, etc. are in the game typesetting with jsmath does not work as expected. Is this a known bug. Do I miss some configuration? --~--~-~--~~~---~--~~ 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: bug with sums of matrices
Pierre, You'll be happy to hear that I got the following response from the Singular team this morning: = Hello Craig Citro, thanks for the bug report. The bug is in the gcd computation for multivariate polynomials over a field extension: therefore it does not show up in the case of univariate polynomials or if all coefficients are in Q. The next Singular version (3-1-0) uses a different algorithm at that place, which is not affected by this error. Hans Schoenemann == So it looks like this will be fixed on the other end soon ... -cc --~--~-~--~~~---~--~~ 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] Seg fault with determinant calculation
I've been pushing the limits of determinant calculation over multivariate polynomial rings. I can calculate determinants of matrices up to 9x9 of the form [[x_0_0, x_0_1],[x_1_0, x_1_1]] (each element is a single unique variable). When I get to 10x10 is runs for a while the crashes with: 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. SAGE will now terminate (sorry). 9x9 matrices only take about 40 seconds. The 10x10 calculation runs for a long time (1 hr) before crashing. This is on 64 bit Ubuntu with the patch in Trac #4068 (http://trac.sagemath.org/sage_trac/ ticket/4068) applied. BTW, what is the underlying algorithm used for the determinants? As I understand it, the naive way is O(N!) while the recursive way is O(N^3) for a NxN matrix. Also, occured is misspelled in the error message. It should be occurred. --~--~-~--~~~---~--~~ 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: Integral problems
i've find anothe way to solve my problems with rect-function: rect=lambda x: Piecewise([ [(-infinity,-1),(lambda x:0)], [(- 1, 1),(lambda x:1)], [( 1, infinity),(lambda x:0)] ])(x); now: plot(rect,-4,4) works, and: f=lambda x: rect(x)*x^2; plot(f,-4,4) works too :-) but now if want to use my function again, i can not: g(x)=1+f(x) so i must use only: g=lambda x:1+f(x) (and show(plot(g,-4,4),ymin=0) or numerical_integral(g,-4,4) works fine). definition like g(x)=1+f(x) is more comfort for me ( On Sep 15, 8:25 pm, David Joyner [EMAIL PROTECTED] wrote: On Mon, Sep 15, 2008 at 11:10 AM, Sand Wraith [EMAIL PROTECTED] wrote: On Sep 13, 2:35 am, Jason Merrill [EMAIL PROTECTED] wrote: On Sep 12, 4:48 pm, Sand Wraith [EMAIL PROTECTED] wrote: Hi all! Help please again :-) here is worksheet describes my problem: http://75.75.6.176/home/pub/8/ so, at the last stem i have wrong result: 0 instead of 2/3. what i am doing wrong? It looks like there are a few problems here, but the main thing is that when you call myrect(x), it just returns 0. def rect(tau=0,t=0): if (t==tau) or (t==-tau): return 0.5 elif (t-tau) and (ttau): return 1 else: return 0; def myrect(x): return rect(1,x); sage: myrect(x) 0 The reason is that when you compare a symbolic variable, x, to a number, 1, and force sage to come up with a True or False answer, as if and elif do, the answer is basically always False. sage: bool(x == 1) False sage: bool(x 1) False sage: bool(x 1) False sage: bool(x -1) False etc. Because of this, when you call myrect(x), things fall down to the last branch of your definition. When an expression appears as an argument to a function, it is evaluated *before* the function is called. For instance, look at sage: plot(myrect(x),(x,-3,3)) # The line segment y == 0 In this case, myrect(x) evaluates to 0 *before* plot has a chance to pass in any values, and the same thing is happening to integral. I'd like to tell you that you can do what you want using piecewise, or something like that, but actually I don't see any way at all to make integral, which needs something that can act like a SymbolicExpression as its first argument, do what you want. Maybe someone else will know. Regards, JM I have redefine rect function: rect=Piecewise([ [(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:1)], [( 1, 10),(lambda x:0)] ]); and i have another two questions: 1) rect.plot() - is it the only way of plotting? i'd like to use Yes, this is the only way to plot rect at the moment. plot(rect,-4,4), but it leads to error: verbose 0 (3729: plot.py, __call__) there were 4 extra arguments (besides function lambda at 0xa9382cc) Traceback (click to the left for traceback) ... UnboundLocalError: local variable 'G' referenced before assignment 2)How can i define another function like rect*f(x) ? and plot it? For some reason, * is not working. You can just redefine your function: for example, rect2 = Piecewise([[(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:sin(x))], [( 1, 10),(lambda x:0)]]) --~--~-~--~~~---~--~~ 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: Seg fault with determinant calculation
On Mon, Sep 15, 2008 at 10:05 AM, phil [EMAIL PROTECTED] wrote: I've been pushing the limits of determinant calculation over multivariate polynomial rings. I can calculate determinants of matrices up to 9x9 of the form [[x_0_0, x_0_1],[x_1_0, x_1_1]] (each element is a single unique variable). When I get to 10x10 is runs for a while the crashes with: 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. SAGE will now terminate (sorry). How much RAM do you have? Write to me off list if you want access to a machine with more :-) 9x9 matrices only take about 40 seconds. The 10x10 calculation runs for a long time (1 hr) before crashing. This is on 64 bit Ubuntu with the patch in Trac #4068 (http://trac.sagemath.org/sage_trac/ ticket/4068) applied. BTW, what is the underlying algorithm used for the determinants? As I understand it, the naive way is O(N!) while the recursive way is O(N^3) for a NxN matrix. Also, occured is misspelled in the error message. It should be occurred. -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ 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: Integral problems
On Mon, Sep 15, 2008 at 1:06 PM, Sand Wraith [EMAIL PROTECTED] wrote: i've find anothe way to solve my problems with rect-function: rect=lambda x: Piecewise([ [(-infinity,-1),(lambda x:0)], [(- 1, 1),(lambda x:1)], [( 1, infinity),(lambda x:0)] ])(x); now: plot(rect,-4,4) works, and: f=lambda x: rect(x)*x^2; plot(f,-4,4) works too :-) Cool! I didn't know these would work. Thanks! but now if want to use my function again, i can not: g(x)=1+f(x) so i must use only: g=lambda x:1+f(x) (and show(plot(g,-4,4),ymin=0) or numerical_integral(g,-4,4) works fine). definition like g(x)=1+f(x) is more comfort for me ( On Sep 15, 8:25 pm, David Joyner [EMAIL PROTECTED] wrote: On Mon, Sep 15, 2008 at 11:10 AM, Sand Wraith [EMAIL PROTECTED] wrote: On Sep 13, 2:35 am, Jason Merrill [EMAIL PROTECTED] wrote: On Sep 12, 4:48 pm, Sand Wraith [EMAIL PROTECTED] wrote: Hi all! Help please again :-) here is worksheet describes my problem: http://75.75.6.176/home/pub/8/ so, at the last stem i have wrong result: 0 instead of 2/3. what i am doing wrong? It looks like there are a few problems here, but the main thing is that when you call myrect(x), it just returns 0. def rect(tau=0,t=0): if (t==tau) or (t==-tau): return 0.5 elif (t-tau) and (ttau): return 1 else: return 0; def myrect(x): return rect(1,x); sage: myrect(x) 0 The reason is that when you compare a symbolic variable, x, to a number, 1, and force sage to come up with a True or False answer, as if and elif do, the answer is basically always False. sage: bool(x == 1) False sage: bool(x 1) False sage: bool(x 1) False sage: bool(x -1) False etc. Because of this, when you call myrect(x), things fall down to the last branch of your definition. When an expression appears as an argument to a function, it is evaluated *before* the function is called. For instance, look at sage: plot(myrect(x),(x,-3,3)) # The line segment y == 0 In this case, myrect(x) evaluates to 0 *before* plot has a chance to pass in any values, and the same thing is happening to integral. I'd like to tell you that you can do what you want using piecewise, or something like that, but actually I don't see any way at all to make integral, which needs something that can act like a SymbolicExpression as its first argument, do what you want. Maybe someone else will know. Regards, JM I have redefine rect function: rect=Piecewise([ [(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:1)], [( 1, 10),(lambda x:0)] ]); and i have another two questions: 1) rect.plot() - is it the only way of plotting? i'd like to use Yes, this is the only way to plot rect at the moment. plot(rect,-4,4), but it leads to error: verbose 0 (3729: plot.py, __call__) there were 4 extra arguments (besides function lambda at 0xa9382cc) Traceback (click to the left for traceback) ... UnboundLocalError: local variable 'G' referenced before assignment 2)How can i define another function like rect*f(x) ? and plot it? For some reason, * is not working. You can just redefine your function: for example, rect2 = Piecewise([[(-10,-1),(lambda x:0)], [(- 1, 1),(lambda x:sin(x))], [( 1, 10),(lambda x:0)]]) --~--~-~--~~~---~--~~ 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: Seg fault with determinant calculation
On Monday 15 September 2008, phil wrote: I've been pushing the limits of determinant calculation over multivariate polynomial rings. I can calculate determinants of matrices up to 9x9 of the form [[x_0_0, x_0_1],[x_1_0, x_1_1]] (each element is a single unique variable). When I get to 10x10 is runs for a while the crashes with: 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. SAGE will now terminate (sorry). I'll try to reproduce the crash and see what I can do about it. You could help by running sage -gdb (if you have gdb installed) and send me the backtrace off list. Thanks. 9x9 matrices only take about 40 seconds. The 10x10 calculation runs for a long time (1 hr) before crashing. This is on 64 bit Ubuntu with the patch in Trac #4068 (http://trac.sagemath.org/sage_trac/ ticket/4068) applied. BTW, what is the underlying algorithm used for the determinants? As I understand it, the naive way is O(N!) while the recursive way is O(N^3) for a NxN matrix. See: http://groups.google.com/group/sage-devel/browse_thread/thread/7aa1bd1e945ff372/ Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: Seg fault with determinant calculation
On Sep 15, 10:08 am, William Stein [EMAIL PROTECTED] wrote: How much RAM do you have? Write to me off list if you want access to a machine with more :-) Ok. I'll send you an off list message. I'm running Sage on 64 bit Ubuntu installed in a VMWare Infrastructure virtual machine with 6 GB of memory allocated. The underlying physical machine has 8 GB. However, free and top only show about 5 GB of total memory. Some how the kernel does not use all 6 GB that is allocated. --~--~-~--~~~---~--~~ 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] Raising an Error resulted in a crash
Dear team, in some Cython module, i am raising an error, as i often did without a problem. But this time, raising the error resulted in a crash: /home/king/SAGE/devel/sage-3.1.1/local/bin/sage-sage: line 216: 23605 Speicherzugriffsfehler sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Does anyone have an idea what can be the reason? Or at least where i may start digging? I am really puzzled, so much that i even have no idea what additional information might help to trac the error. Just as a test, i inserted a print command right before raising the error. The print command worked, but then Sage quit without even saying good bye. Yours 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: Raising an Error resulted in a crash
Try running as sage -gdb , which will catch the error. Then you can type bt at the prompt to get a c traceback. On Sep 15, 2008, at 2:41 PM, Simon King wrote: Dear team, in some Cython module, i am raising an error, as i often did without a problem. But this time, raising the error resulted in a crash: /home/king/SAGE/devel/sage-3.1.1/local/bin/sage-sage: line 216: 23605 Speicherzugriffsfehler sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Does anyone have an idea what can be the reason? Or at least where i may start digging? I am really puzzled, so much that i even have no idea what additional information might help to trac the error. Just as a test, i inserted a print command right before raising the error. The print command worked, but then Sage quit without even saying good bye. Yours 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: Raising an Error resulted in a crash
Dear Robert, On Sep 16, 12:46 am, Robert Bradshaw [EMAIL PROTECTED] wrote: Try running as sage -gdb , which will catch the error. Then you can type bt at the prompt to get a c traceback. I don't understand what the following tells me. When there should be an error raised, instead i get: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46922761735376 (LWP 26484)] 0x0041befe in instancemethod_call (func=0x34ba680, arg=0x36ebab8, kw=0x0) at Objects/classobject.c:2477 2477Objects/classobject.c: Datei oder Verzeichnis nicht gefunden. in Objects/classobject.c (gdb) bt #0 0x0041befe in instancemethod_call (func=0x34ba680, arg=0x36ebab8, kw=0x0) at Objects/classobject.c:2477 #1 0x00415913 in PyObject_Call (func=0x36ebab8, arg=0x36ebab8, kw=0x0) at Objects/abstract.c:1861 #2 0x0047efd2 in PyEval_CallObjectWithKeywords (func=0x35a4f00, arg=0x36ebab8, kw=0x0) at Python/ceval.c:3442 #3 0x0041dd68 in instance_getattr (inst=value optimized out, name=0x99a840) at Objects/classobject.c:755 #4 0x2aad32fd7298 in ?? () #5 0x in ?? () That's all. But what does it mean? 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: Raising an Error resulted in a crash
On Sep 15, 2008, at 3:56 PM, Simon King wrote: Dear Robert, On Sep 16, 12:46 am, Robert Bradshaw [EMAIL PROTECTED] wrote: Try running as sage -gdb , which will catch the error. Then you can type bt at the prompt to get a c traceback. I don't understand what the following tells me. When there should be an error raised, instead i get: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46922761735376 (LWP 26484)] 0x0041befe in instancemethod_call (func=0x34ba680, arg=0x36ebab8, kw=0x0) at Objects/classobject.c:2477 2477Objects/classobject.c: Datei oder Verzeichnis nicht gefunden. in Objects/classobject.c (gdb) bt #0 0x0041befe in instancemethod_call (func=0x34ba680, arg=0x36ebab8, kw=0x0) at Objects/classobject.c:2477 #1 0x00415913 in PyObject_Call (func=0x36ebab8, arg=0x36ebab8, kw=0x0) at Objects/abstract.c:1861 #2 0x0047efd2 in PyEval_CallObjectWithKeywords (func=0x35a4f00, arg=0x36ebab8, kw=0x0) at Python/ceval.c:3442 #3 0x0041dd68 in instance_getattr (inst=value optimized out, name=0x99a840) at Objects/classobject.c:755 #4 0x2aad32fd7298 in ?? () #5 0x in ?? () That's all. But what does it mean? Hmm... that's not a very informative traceback (just generic Python calls). I would try putting some print statements in. What is the return type of the function you're raising an error from? - 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: Raising an Error resulted in a crash
On Sep 15, 4:07 pm, Robert Bradshaw [EMAIL PROTECTED] wrote: On Sep 15, 2008, at 3:56 PM, Simon King wrote: Dear Robert, On Sep 16, 12:46 am, Robert Bradshaw [EMAIL PROTECTED] wrote: Try running as sage -gdb , which will catch the error. Then you can type bt at the prompt to get a c traceback. I don't understand what the following tells me. When there should be an error raised, instead i get: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46922761735376 (LWP 26484)] 0x0041befe in instancemethod_call (func=0x34ba680, arg=0x36ebab8, kw=0x0) at Objects/classobject.c:2477 2477 Objects/classobject.c: Datei oder Verzeichnis nicht gefunden. in Objects/classobject.c (gdb) bt #0 0x0041befe in instancemethod_call (func=0x34ba680, arg=0x36ebab8, kw=0x0) at Objects/classobject.c:2477 #1 0x00415913 in PyObject_Call (func=0x36ebab8, arg=0x36ebab8, kw=0x0) at Objects/abstract.c:1861 #2 0x0047efd2 in PyEval_CallObjectWithKeywords (func=0x35a4f00, arg=0x36ebab8, kw=0x0) at Python/ceval.c:3442 #3 0x0041dd68 in instance_getattr (inst=value optimized out, name=0x99a840) at Objects/classobject.c:755 #4 0x2aad32fd7298 in ?? () #5 0x in ?? () That's all. But what does it mean? Hmm... that's not a very informative traceback (just generic Python calls). I would try putting some print statements in. What is the return type of the function you're raising an error from? - Robert There are a couple things you can do: a) boil it down to a simple patch against some recent 3.1.x and I can take a look. b) Build the Sage library with -O0. To do so edit $SAGE_ROOT/local/ lib/python2.5/config/Makefile and change # Compiler options OPT=-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes to # Compiler options OPT=-DNDEBUG -g -fwrapv -O0 -Wall -Wstrict-prototypes Maybe that will help. Then do a sage -ba to rebuild the whole Sage library If that still does not help you can also build Python with -O0, but we can do that later. 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: Raising an Error resulted in a crash
Dear Robert, simply for testing, i raise an error as soon as the init-method of my class is called. So, for the moment the code looks like this: class COHO: Docstring def __init__(self, *args, **kwds): raise ValueError, fooBAR... # followed by a lots of more code And now the reason why i am puzzled. If i write a .pyx file with the above content, then everything is fine (i.e., an error is raised, but no crash occurs). But with my module (although the relevant (?) part of it has exactly the above form), it fails: sage: from cohomology import * sage: H=COHO() /home/king/SAGE/devel/sage-3.1.1/local/bin/sage-sage: line 216: 27343 Speicherzugriffsfehler sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Note that my class also has a __del__ method. Could that be the reason for the Speicherzugriffsfehler (what is it in english?)? I mean, would __del__ be called if __init__ fails? 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: Raising an Error resulted in a crash
On Sep 15, 2008, at 4:22 PM, Simon King wrote: Dear Robert, simply for testing, i raise an error as soon as the init-method of my class is called. So, for the moment the code looks like this: class COHO: Docstring def __init__(self, *args, **kwds): raise ValueError, fooBAR... # followed by a lots of more code And now the reason why i am puzzled. If i write a .pyx file with the above content, then everything is fine (i.e., an error is raised, but no crash occurs). But with my module (although the relevant (?) part of it has exactly the above form), it fails: sage: from cohomology import * sage: H=COHO() /home/king/SAGE/devel/sage-3.1.1/local/bin/sage-sage: line 216: 27343 Speicherzugriffsfehler sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Note that my class also has a __del__ method. Could that be the reason for the Speicherzugriffsfehler (what is it in english?)? I mean, would __del__ be called if __init__ fails? No idea what Speicherzugriffsfehler means (never heard of that before) but __del__ might be called on a failing __init__. For Cython, you might want to use __cinit__ and __dealloc__ (which are guaranteed to be called exactly once in pairs). - 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: Raising an Error resulted in a crash
On Sep 15, 4:25 pm, Robert Bradshaw [EMAIL PROTECTED] wrote: On Sep 15, 2008, at 4:22 PM, Simon King wrote: Dear Robert, simply for testing, i raise an error as soon as the init-method of my class is called. So, for the moment the code looks like this: class COHO: Docstring def __init__(self, *args, **kwds): raise ValueError, fooBAR... # followed by a lots of more code And now the reason why i am puzzled. If i write a .pyx file with the above content, then everything is fine (i.e., an error is raised, but no crash occurs). But with my module (although the relevant (?) part of it has exactly the above form), it fails: sage: from cohomology import * sage: H=COHO() /home/king/SAGE/devel/sage-3.1.1/local/bin/sage-sage: line 216: 27343 Speicherzugriffsfehler sage-ipython $@ -c $SAGE_STARTUP_COMMAND; Note that my class also has a __del__ method. Could that be the reason for the Speicherzugriffsfehler (what is it in english?)? I mean, would __del__ be called if __init__ fails? No idea what Speicherzugriffsfehler means (never heard of that before) but __del__ might be called on a failing __init__. invalid memory access :) For Cython, you might want to use __cinit__ and __dealloc__ (which are guaranteed to be called exactly once in pairs). - Robert 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: bug in sage -clone for 3.1.2.rc4?
On Sep 15, 6:27 pm, David Joyner [EMAIL PROTECTED] wrote: Hi: After building 3.1.2.rc4 I got the following error when I tried to create a clone: snip SAGE build/upgrade complete! [EMAIL PROTECTED]:~/sagefiles/sage-3.1.2.rc4$ ./sage -clone dbl-coset File /home/wdj/sagefiles/sage-3.1.2.rc4/local/bin/sage-clone, line 71 echo 'Pbuild is currently broken -- defaulting to serial build.' ^ SyntaxError: invalid syntax real 0m0.043s user 0m0.018s sys 0m0.006s Does this make any sense? Yes, it is a stupid buglet that we just fixed. It slipped by during the review process since it was 5 am :( - David Joyner Patch is up at #4131 that fixes the issue. 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] Maxima problems in sage 3.1.1
Thanks Michael, Check your home directory for any file with an accent or Umlaut and you likely found the culprit you need to rename. This fixed the problem. Good luck with ecls. Cheers, Jason mabshoff wrote: On Sep 15, 6:34 pm, Jason Bandlow [EMAIL PROTECTED] wrote: Hello, I've been happily '$ sage -updgrade'ing since sage 2.10 or so, and recently noticed that I couldn't use Maxima (details below). I'm not sure for how long I've had this problem. Knowing the disclaimer that applies to upgrading, I downloaded the linux 32-bit binaries for 3.1.1 from sagemath.org and still had the same problem. I'm running Ubuntu Hardy on an AMD laptop. If I try any command that calls Maxima, I have to wait for a timeout, and then get an error. Specific system information and a traceback are below. Thanks very much for any help, Jason Bandlow SNIP Hi Jason, *** - invalid byte #xFD in CHARSET:UTF-8 conversion, not a Unicode-16 this is #2841 and clisp riding on the short bus. Check your home directory for any file with an accent or Umlaut and you likely found the culprit you need to rename. This has been open on the clisp end forever and has never been fixed. That is why we are moving to ecls, hopefully in the 3.1.3 release cycle. 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 -~--~~~~--~~--~--~---