[sage-support] Groebner bases and varieties computation on multiple CPUs

2008-11-24 Thread vpv
Hi, Is there a way to compute Groebner bases and varieties in parallel on multiple processors or in a cluster? Thanks. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[sage-support] Re: Groebner bases and varieties computation on multiple CPUs

2008-11-24 Thread mabshoff
On Nov 24, 12:21 am, vpv [EMAIL PROTECTED] wrote: Hi, Hi, Is there a way to compute Groebner bases and varieties in parallel on multiple processors or in a cluster? What exactly do you want to do (a) compute the Gbasis of some ideal with different strategies and/or programs at the same

[sage-support] Re: Groebner bases and varieties computation on multiple CPUs

2008-11-24 Thread vpv
Thanks for your reply, Michael! Please see more details about my problem below: Let 'e' designate a system of boolean equations. Then I have the following code: I=ideal(e) G=I.groebner_basis() I2=ideal(G) V = I2.variety() 'e' is composed of approx. 1000 quadratic equations in approx. 500

[sage-support] The real part of a matrix

2008-11-24 Thread Bill
Hello, given a matrix over CDF I would like to obtain its real and imaginary parts. I know how to write my own function to do this, but I was wondering if there is one built-in. Couldn't see anything in the docs. Many thanks, Bill (using SAGE version 3.0.5).

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Burcin Erocal
On Mon, 24 Nov 2008 12:19:55 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H, x, y) sage: u = Piecewise([((0, h), x/h), ((h, H), 1)]) sage:

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread David Joyner
On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H, x, y) sage: u = Piecewise([((0, h), x/h), ((h, H), 1)]) I don't think

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread David Joyner
On Mon, Nov 24, 2008 at 7:25 AM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H,

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Ondrej Certik
On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H,

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Ondrej Certik
On Mon, Nov 24, 2008 at 2:15 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 7:25 AM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage:

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Burcin Erocal
On Mon, 24 Nov 2008 14:04:53 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage:

[sage-support] Re: The real part of a matrix

2008-11-24 Thread Jason Grout
Bill wrote: Hello, given a matrix over CDF I would like to obtain its real and imaginary parts. I know how to write my own function to do this, but I was wondering if there is one built-in. Couldn't see anything in the docs. I don't think there is a built-in function for it, but you can

[sage-support] Graphics3D Question

2008-11-24 Thread Chris Fronk
I'm not sure if this is a bug or just something I'm misunderstanding, but for 2D graphics I can write code like this. g = Graphics() g += line( [ [-1,-1], [1,1] ] ) g.show() But in 3D if I do either g = Graphics() g += sphere( (1,1,1), 2 ) g.show() or g =

[sage-support] Re: polymake

2008-11-24 Thread chirag.lakh...@gmail.com
I'm interested in toric varieties and calculating integral points in polytopes. I was told that polymake was one of the polyhedral programs around which is why I asked about SAGE compatibility. Honestly, I haven't looked at the native polyhedra features but I will certainly do that. There's

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Ondrej Certik
On Mon, Nov 24, 2008 at 3:08 PM, Burcin Erocal [EMAIL PROTECTED] wrote: On Mon, 24 Nov 2008 14:04:53 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED]

[sage-support] Re: The real part of a matrix

2008-11-24 Thread Bill
Thanks Jason, I opted to use Re(X) = (X + X.conjugate())/2 in the end. I don't know enough about Python's interpreter to know whether this is more or less efficient than your suggestion. Thank you for the info about the new version, I shall upgrade soon. Will. On Nov 24, 3:01 pm, Jason Grout

[sage-support] Re: polymake

2008-11-24 Thread Marshall Hampton
OK, as I said I am actively adding functionality to the sage-native stuff, so please let me know what you need. Sage also includes the PALP package by default, which can compute interior integral points. I have not added that functionality into my Polyhedron class but I will; as it is there are

[sage-support] Re: Graphics3D Question

2008-11-24 Thread Marshall Hampton
This has bothered me too and I think it is a bug. I have made it trac ticket #4604. It shouldn't be too hard to fix. As a workaround I am currently doing something like: g = point3d((0,0,0),opacity = 0) which gives you an invisible point at the origin. -M. Hampton On Nov 24, 9:47 am,

[sage-support] How to doc test an exception?

2008-11-24 Thread Simon King
Dear Sage Team, I know that one can doc test exceptions by sage: stupid_code() Traceback (most recent call last): ... TypeError: error message RTFM My problem: The error message will not always be the same. It is an error raised by the Singular interface, the error message will

[sage-support] Re: How to doc test an exception?

2008-11-24 Thread mabshoff
On Nov 24, 11:02 am, Simon King [EMAIL PROTECTED] wrote: Dear Sage Team, Hi Simon, I know that one can doc test exceptions by     sage: stupid_code()     Traceback (most recent call last):     ...     TypeError: error message RTFM My problem: The error message will not always be the

[sage-support] Re: Graphics3D Question

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 7:47 AM, Chris Fronk [EMAIL PROTECTED] wrote: I'm not sure if this is a bug or just something I'm misunderstanding, but for 2D graphics I can write code like this. g = Graphics() g += line( [ [-1,-1], [1,1] ] ) g.show() But in 3D if I do either g = Graphics() g

[sage-support] Re: How to doc test an exception?

2008-11-24 Thread Simon King
Hi Michael, thank you, but I am afraid it did not work. Now, my doc test is sage: singular('%sI'%(H.prefix)) Traceback (most recent call last): ... TypeError: Singular error: ? ... is undefined ? error occurred in STDIN line ...: `def ...;` and here is what the doc

[sage-support] Re: polymake

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 8:09 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm interested in toric varieties and calculating integral points in polytopes. I was told that polymake was one of the polyhedral programs around which is why I asked about SAGE compatibility. Honestly, I haven't

[sage-support] Re: Groebner bases and varieties computation on multiple CPUs

2008-11-24 Thread mabshoff
On Nov 24, 2:04 am, vpv [EMAIL PROTECTED] wrote: Hi, Thanks for your reply, Michael! Please see more details about my problem below: Let 'e' designate a system of boolean equations. Then I have the following code: I=ideal(e) G=I.groebner_basis() I2=ideal(G) V = I2.variety() 'e' is

[sage-support] Re: Groebner bases and varieties computation on multiple CPUs

2008-11-24 Thread Martin Albrecht
Unfortunately not. I have seen Buchberger's algorithm implemented with parallel reduction on a shared memory system with allegedly decent performance with up to 8 CPUs in a shared memory system (i.e. all in one big box, not a cluster), but the implementation was in Java and is not integrated

[sage-support] Re: Groebner bases and varieties computation on multiple CPUs

2008-11-24 Thread mabshoff
On Nov 24, 12:58 pm, Martin Albrecht [EMAIL PROTECTED] wrote: Hi, Unfortunately not. I have seen Buchberger's algorithm implemented with parallel reduction on a shared memory system with allegedly decent performance with up to 8 CPUs in a shared memory system (i.e. all in one big box,

[sage-support] Simplification/Rewrite Rules?

2008-11-24 Thread Tim Lahey
Hi, Is there a specific way to add rules (and apply them) to rewrite expressions in Sage? Such as, log(a)-log(b) = log(a/b) I need this (and others) in order to properly compare the integration results from Sage to the list of integrals I have. I'm trying to put together a suite of integration

[sage-support] Re: Linking Worksheets Together

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 4:30 PM, Owen [EMAIL PROTECTED] wrote: I looked but couldn't find how to create a set of linked worksheets like the tutorial. I.e. if you look at: http://localhost:8000/doc/live/tut/node8.html .. you see links between the worksheets (previous up next and so on) Is

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread Tim Lahey
On Nov 24, 2008, at 8:45 PM, William Stein wrote: On Mon, Nov 24, 2008 at 4:46 PM, Tim Lahey [EMAIL PROTECTED] wrote: Hi, Is there a specific way to add rules (and apply them) to rewrite expressions in Sage? Such as, log(a)-log(b) = log(a/b) I need this (and others) in order to

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 6:03 PM, Tim Lahey [EMAIL PROTECTED] wrote: On Nov 24, 2008, at 8:45 PM, William Stein wrote: On Mon, Nov 24, 2008 at 4:46 PM, Tim Lahey [EMAIL PROTECTED] wrote: Hi, Is there a specific way to add rules (and apply them) to rewrite expressions in Sage? Such as,

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread Tim Lahey
On Nov 24, 2008, at 9:05 PM, William Stein wrote: I can easily run timing comparisons between maxima and FriCAS, but because of how sympy does things (with its separate variables), I'll have to run them separately. Comparing maxima and FriCAS, the timings are pretty close on both for

[sage-support] Open Source webMathematica?

2008-11-24 Thread heebie
Hi, I want to be able to recreate the functionalities of webMathematica on my website, as demostrated here http://www.quickmath.com . Will Sage do this, and if not, can you recommend some free/open source software that will, please? Cheers, heebie.

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread mabshoff
On Nov 24, 6:17 pm, Tim Lahey [EMAIL PROTECTED] wrote: On Nov 24, 2008, at 9:05 PM, William Stein wrote: Hi, I can easily run timing comparisons between maxima and FriCAS, but because of how sympy does things (with its separate variables), I'll have   to run them separately.

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread Tim Lahey
On Nov 24, 2008, at 9:21 PM, mabshoff wrote: We have a timeit doctest framework that is supposed to hunt for speed regressions. It is merged in 3.2, but we need infrastructure to compare the output from several runs. But I guess you are asking if timeit('foo') could return the time so

[sage-support] Re: Open Source webMathematica?

2008-11-24 Thread Jason Grout
heebie wrote: Hi, I want to be able to recreate the functionalities of webMathematica on my website, as demostrated here http://www.quickmath.com . Sage has a much more powerful, full online notebook interface. See http://www.sagenb.org to sign up for a free account to try it out. If

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread Mike Hansen
On Mon, Nov 24, 2008 at 6:31 PM, Tim Lahey [EMAIL PROTECTED] wrote: I know I could parse the output, but I thought someone might have done it and it sounds like the timeit doctest framework might do it. Where can I find this in the source so I can see how it is doing it? You can do this in

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread mabshoff
On Nov 24, 7:03 pm, Tim Lahey [EMAIL PROTECTED] wrote: On Nov 24, 2008, at 9:51 PM, Mike Hansen wrote: You can do this in 3.2: sage: s = timeit.eval(2+3) sage: s 625 loops, best of 3: 942 ns per loop sage: s.stats (625, 3, 3, 942.230224609375, 'ns') The code is in

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread Tim Lahey
On Nov 24, 2008, at 10:07 PM, mabshoff wrote: You should consider creating one or a couple large files with the integrals for doctesting and stuff them into $SAGE_ROOT/devel/tests. Hopefully it can be arranged to feed the input into Maxima/Axiom/ Maple/ MMA/sympy and so on and compare the

[sage-support] Writing doctests and timing

2008-11-24 Thread Tim Lahey
Hi, If I have the following example Sage code, var('x,a,b') # Test 1 f1 = 1/(a*x+b) aa = f1.integrate(x) bb = 1/a*log(a*x+b) aa_cmp = bb-aa # Should be zero sage_time_f1 = timeit.eval('f1.integrate(x)') friCAS_time_f1 = timeit.eval('axiom.integrate(f1,x)') How do I write it as a test? The

[sage-support] Re: Simplification/Rewrite Rules?

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 6:17 PM, Tim Lahey [EMAIL PROTECTED] wrote: On Nov 24, 2008, at 9:05 PM, William Stein wrote: I can easily run timing comparisons between maxima and FriCAS, but because of how sympy does things (with its separate variables), I'll have to run them separately.

[sage-support] Re: Writing doctests and timing

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 8:27 PM, Tim Lahey [EMAIL PROTECTED] wrote: Hi, If I have the following example Sage code, var('x,a,b') # Test 1 f1 = 1/(a*x+b) aa = f1.integrate(x) bb = 1/a*log(a*x+b) aa_cmp = bb-aa # Should be zero sage_time_f1 = timeit.eval('f1.integrate(x)')

[sage-support] Re: Drawing points on a sphere

2008-11-24 Thread acardh
Hi When I call, world + sum([point3d(v, color='red') for v in city_coords]) + sum ([point3d(v, size=2, color='green') for v in mydots]) from within a file it does not work. I do not get an error message, it is just that the Jmol 3D image viewer never appears. That line of code call Jmol only

[sage-support] Re: Writing doctests and timing

2008-11-24 Thread Tim Lahey
On Nov 24, 2008, at 11:54 PM, William Stein wrote: On Mon, Nov 24, 2008 at 8:27 PM, Tim Lahey [EMAIL PROTECTED] wrote: Hi, If I have the following example Sage code, var('x,a,b') # Test 1 f1 = 1/(a*x+b) aa = f1.integrate(x) bb = 1/a*log(a*x+b) aa_cmp = bb-aa # Should be zero

[sage-support] Re: Drawing points on a sphere

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 9:00 PM, acardh [EMAIL PROTECTED] wrote: Hi When I call, world + sum([point3d(v, color='red') for v in city_coords]) + sum ([point3d(v, size=2, color='green') for v in mydots]) from within a file it does not work. I do not get an error message, it is just that

[sage-support] Re: Linking Worksheets Together

2008-11-24 Thread Owen
No worries, I mainly wanted to be sure I wasn't missing something. On Nov 24, 6:47 pm, William Stein [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 4:30 PM, Owen [EMAIL PROTECTED] wrote: I looked but couldn't find how to create a set of linked worksheets like the tutorial.  I.e. if you

[sage-support] Re: Writing doctests and timing

2008-11-24 Thread Tim Lahey
On Nov 25, 2008, at 12:33 AM, Jason Grout wrote: sage: import sympy sage: var('x,a,b') (x, a, b) sage: f1=1/(a*x+b) sage: sympy.integrate(sympy.sympify(f1),sympy.sympify(x)) 1/a*log(b + a*x) sage: sympy_integrate = lambda f,x: sympy.integrate(sympy.sympify(f), sympy.sympify(x)) sage:

[sage-support] Re: Writing doctests and timing

2008-11-24 Thread Jason Grout
Tim Lahey wrote: On Nov 25, 2008, at 12:33 AM, Jason Grout wrote: sage: import sympy sage: var('x,a,b') (x, a, b) sage: f1=1/(a*x+b) sage: sympy.integrate(sympy.sympify(f1),sympy.sympify(x)) 1/a*log(b + a*x) sage: sympy_integrate = lambda f,x: sympy.integrate(sympy.sympify(f),

[sage-support] Re: need helps in optimizing speed

2008-11-24 Thread pong
I see that the ticket http://trac.sagemath.org/sage_trac/ticket/4533 has been closed. Thank you for the effort, now divisors in SAGE is much faster!! However, the one that packed in SAGE 3.2 is still about 3 times slower than that in PARI. I wonder if all the improvements have been implemented

[sage-support] Re: need helps in optimizing speed

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 10:43 PM, pong [EMAIL PROTECTED] wrote: I see that the ticket http://trac.sagemath.org/sage_trac/ticket/4533 has been closed. Thank you for the effort, now divisors in SAGE is much faster!! However, the one that packed in SAGE 3.2 is still about 3 times slower than

[sage-support] Re: need helps in optimizing speed

2008-11-24 Thread pong
Oh really. Now I realized why I had in my mind that SAGE was much slower---the test what based on a more complicated function instead of just divisors. Looking forward to SAGE 3.2.1 then. On Nov 24, 11:05 pm, William Stein [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 10:43 PM, pong [EMAIL