[sage-devel] Re: Building Sage 4.7.2 on openSUSE 12.1 (64-bit)

2011-11-23 Thread Thomas Hupfer
Hi,

finally I succeeded in building sage.

Setting LD_LIBRARY_PATH didn't solve all issues as e.g.
the spkg-install in readline-6.1.spkg expects everything in lib
and not in lib64.

The problem is that several packages including readline install files
(.a, .so etc.) in
$SAGE_LOCAL/local/lib64, but these files are expected to be in
$SAGE_LOCAL/local/lib.

I didn't find out the reason for this. (Maybe a missing devel-rpm, a
wrong devel-rpm,
a 32-bit devel-rpm too much, a general openSuSE misconfiguration or
the sage build-scripts
not adapted to 64-bit. If anyone has an idea I probably would
investigate further.)

The trivial workaround which works for me is:
after

tar xf sage-4.7.2.tar
cd  sage-4.7.2

do

mkdir -p local/lib
ln -s llib local/lib64

and then

make.

Now everything seems fine at first glance.
The readline-spkg of  sage does work in openSuSE 12.1.

Thomas

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] signs of a memory leak?

2011-11-23 Thread David Roe
I'm not a Valgrind expert, but I think that it's the tool you're
looking for.  Take a look at the Valgrind options listed at the bottom
of the output from "sage -advanced".  sage -memcheck looks like it
might be useful.
David

On Wed, Nov 23, 2011 at 13:12, Dima Pasechnik  wrote:
> consider the following Sage code:
> while True:
>     reset()
>     # do some time– and memory-consuming stuff (using mpmath)
> When it is run, we witness  at each iteration the amount of memory growing,
> until, after 10 hours or so, it takes 3Gb of RAM
> and triggers an OOM kernel event...
> Is it a memory leak?
> How one does debug this?
> Thanks,
> Dima
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-23 Thread rjf

Maxima compiles code to binary, and has done so, oh for a couple of
decades.

 Since Maxima is part of Sage, one might hope that William would be
aware of this feature.

  Example.

g(x):=block([s:0],for i thru x do s:s+i^2,s);

g(1);  takes 0.15 seconds.

compile(g);   converts g to lisp and compiles it with an optimizing
compiler.

g is now about 5X faster.

if one inserts declarations, e.g.  mode_declare(i,fixnum, x, fixnum,
s, fixnum),
the code goes about 10X faster.   I think that one can improve the
speed
substantially beyond that by setting optimization levels in the (lisp)
compiler.
I was using a GCL-based Maxima.

RJF


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Improving the documentation...

2011-11-23 Thread Florent Hivert
  Hi,

On Wed, Nov 23, 2011 at 05:41:32AM -0800, kcrisman wrote:
> 
> 
> On Nov 23, 8:24 am, Jeroen Demeyer  wrote:
> > On 2011-11-23 11:50, Florent Hivert wrote:
> >
> > > I'm also volunteering to
> > > add a section about that in the developer guide. What do you think ?
> 
> See 
> http://www.sagemath.org/doc/developer/sage_manuals.html#setting-hyperlink-to-modules-classes-methods-etc
> 
> > That would be very cool.  I have often thought about making "See Also"
> > links, but I never know how to do it.  Of course, the "see also" links
> > really should be hyperlinks.  Also, is it possible for example to put
> 
> Right!  See for instance 
> http://hg.sagemath.org/sage-main/file/9e29a3d84c48/sage/plot/plot.py#l1
> and anything with a tilde, basically, like
> 
> :func:`~sage.plot.arrow.arrow`
> 
> this is how such links are created, see
> 
> http://www.sagemath.org/doc/reference/sage/plot/plot.html
> 
> and clicking on 'arrow()' takes you to
> 
> http://www.sagemath.org/doc/reference/sage/plot/arrow.html#sage.plot.arrow.arrow
> 
> There are similar structures for modules, I think.
> 
> > links to the developer/installation guide?

> Hmm, since those are basically separately generated, that might not be
> possible.  Experts in the doc build, any ideas?

Yes it is perfectly feasible using intersphinx (though this may force multiple
compilation a la LaTeX).

Actually to ease linking, I wrote

  "Ticket #9128 Sphinx should be aware of all.py to find its links" 

but I think it has certainly bit-rotted now. It allows to link any document
(in particular tutorial and construction) to the reference manual. I'll plan
to update it for the new sphinx version now that it is in Sage.

Cheers,

Florent

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: torrent question

2011-11-23 Thread Keshav Kini
That looks promising.

User jordan on #transmission (freenode) said he will work on implementing 
web seed in `transmission-create`, the utility for creating .torrent files 
which comes with Transmission. See 
https://trac.transmissionbt.com/ticket/4645 (not that this is of great 
importance as we could use a different program).

There are Python bindings to libtorrent, which supports web seeds as well.

-Keshav


Join us in #sagemath on irc.freenode.net !

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] signs of a memory leak?

2011-11-23 Thread Dima Pasechnik
consider the following Sage code:

while True:
reset()
# do some time– and memory-consuming stuff (using mpmath)

When it is run, we witness  at each iteration the amount of memory growing, 
until, after 10 hours or so, it takes 3Gb of RAM
and triggers an OOM kernel event...

Is it a memory leak?
How one does debug this?

Thanks,
Dima

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] CPPFLAGS not preserved by sage-env

2011-11-23 Thread Bill Janssen
I'm guessing that CPPFLAGS should also be preserved by sage-env.
Similar to CXXFLAGS and LDFLAGS, it's typically used to pass include
options to the C preprocessor.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: torrent question

2011-11-23 Thread Harald Schilly
On Wed, Nov 23, 2011 at 02:48, Keshav Kini  wrote:
> As for actually generating the .torrent files with web seed info in them, T

I found a tool called "mktorrent" that has this webseed feature (in
init.c, it is possible to add them via repeated -w arguments [1]).
I'll look into this but having to compile some C code might be above
my head …

[1] https://github.com/esmil/mktorrent/blob/master/init.c#L485

H

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-23 Thread Jason Grout

On 11/23/11 9:36 AM, William Stein wrote:



-- Forwarded message --
From: Andrew Moylan
Date: Wednesday, November 23, 2011
Subject: C compiler in Mathematica
To: wst...@gmail.com 


Hello Prof Stein,

In your FoCM 11 article at
http://modular.math.washington.edu/papers/focm11/focm11.pdf you
mentioned "None of the Ma's has an optimizing compiler that converts
programs written in their custom interpreted language to a- fast
executable binary format that is not interpreted at runtime." However
Mathematica 8's compiler does have this capability: Compile with the
setting CompilationTarget -> "C" compiles and links to a native machine
code dynamic library
(http://reference.wolfram.com/mathematica/ref/CompilationTarget.html).




Neat!  I just tried it out in MMA 8 and the fractal example from the 
documentation above seems to work pretty well.



You might forward back to them that there is a grammar typo in the last 
sentence on that page.  "Note that this is an image to interact with the 
picture you need to evaluate the commands:" should have a semicolon or 
period somewhere in there.


Thanks,

Jason

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Fwd: C compiler in Mathematica

2011-11-23 Thread William Stein
-- Forwarded message --
From: Andrew Moylan
Date: Wednesday, November 23, 2011
Subject: C compiler in Mathematica
To: wst...@gmail.com


Hello Prof Stein,

In your FoCM 11 article at
http://modular.math.washington.edu/papers/focm11/focm11.pdf you mentioned
"None of the Ma's has an optimizing compiler that converts programs written
in their custom interpreted language to a- fast executable binary format
that is not interpreted at runtime." However Mathematica 8's compiler does
have this capability: Compile with the setting CompilationTarget -> "C"
compiles and links to a native machine code dynamic library (
http://reference.wolfram.com/mathematica/ref/CompilationTarget.html).

Regards,

Andrew Moylan
Wolfram Research




-- 
Sent from Gmail Mobile

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Symbolic nth_root()

2011-11-23 Thread Burcin Erocal
On Tue, 22 Nov 2011 09:41:56 -0800 (PST)
kcrisman  wrote:

> 
> > > I don't think it exists,  The symbolic functionality in Sage is
> > > supposed to make it "easy" for users to define a new symbolic
> > > function at runtime, including how that function gets simplified.
> > >  This is supposed to not involve any C++ coding with Pynac.   So
> > > it _should_ be easy to add what you suggest.  Maybe Burcin can
> > > pipe up.
> >
> > Here is a symbolic function which wraps RR.nth_root():
> >
> > from sage.symbolic.function import BuiltinFunction, is_inexact
> > from sage.symbolic.expression import Expression
> > from sage.structure.coerce import parent
> >
> > class RealNthRoot(BuiltinFunction):
> >     def __init__(self):
> >         BuiltinFunction.__init__(self, "real_nth_root", nargs=2)
> >
> >     def _eval_(self, base, exp):
> >         if (not isinstance(base, Expression) and is_inexact(base))
> > or \ (not isinstance(exp, Expression) and is_inexact(exp)):
> >             self._evalf_(base, exp, parent=parent(base))
> >
> >     def _evalf_(self, base, exp, parent=None):
> >         if isinstance(base, float):
> >             return RR(base).nth_root(exp)
> >         try:
> >             return base.nth_root(exp)
> >         except AttributeError:
> >             return base**(1/exp)
> >         return parent(base)**parent(exp)
> >
> > The code is also here:
> >
> > http://sage.math.washington.edu/home/burcin/real_nth_root.py
> >
> > I can plot this without trouble:
> >
> > sage: attach real_nth_root.py
> > sage: real_nth_root = RealNthRoot()
> > sage: v = real_nth_root(x, 3)
> > sage: plot(v, (x, -1, 1))
> > 
> 
> Maybe this would be the best solution.  If you put this on a ticket
> with patch I'll try to make sure this gets reviewed properly at Sage
> Days 35.5.

Thanks! I attached a patch to #12074. Still needs documentation and
tests.

http://trac.sagemath.org/sage_trac/ticket/12074


Cheers,
Burcin

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Improving the documentation...

2011-11-23 Thread Jason Grout

On 11/23/11 6:50 AM, Jason Grout wrote:

On 11/23/11 6:41 AM, kcrisman wrote:



On Nov 23, 8:24 am, Jeroen Demeyer wrote:

On 2011-11-23 11:50, Florent Hivert wrote:


I'm also volunteering to
add a section about that in the developer guide. What do you think ?


See
http://www.sagemath.org/doc/developer/sage_manuals.html#setting-hyperlink-to-modules-classes-methods-etc



That would be very cool. I have often thought about making "See Also"
links, but I never know how to do it. Of course, the "see also" links
really should be hyperlinks. Also, is it possible for example to put


Right! See for instance
http://hg.sagemath.org/sage-main/file/9e29a3d84c48/sage/plot/plot.py#l1
and anything with a tilde, basically, like

:func:`~sage.plot.arrow.arrow`

this is how such links are created, see


Actually the hyperlink is created just from the :func: part, i.e.,
:func:`sage.plot.arrow.arrow` also creates a hyperlink. The difference
is that the text reads sage.plot.arrow.arrow() in this case, whereas
with the tilde, the text just reads arrow(). The tilde just takes off
the initial module part of the text so that it reads better. The
hyperlink is not affected, though.


See http://sphinx.pocoo.org/markup/inline.html#cross-referencing-syntax 
for docs about the tilde.


Thanks,

Jason



--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Improving the documentation...

2011-11-23 Thread Jason Grout

On 11/23/11 6:41 AM, kcrisman wrote:



On Nov 23, 8:24 am, Jeroen Demeyer  wrote:

On 2011-11-23 11:50, Florent Hivert wrote:


I'm also volunteering to
add a section about that in the developer guide. What do you think ?


See 
http://www.sagemath.org/doc/developer/sage_manuals.html#setting-hyperlink-to-modules-classes-methods-etc


That would be very cool.  I have often thought about making "See Also"
links, but I never know how to do it.  Of course, the "see also" links
really should be hyperlinks.  Also, is it possible for example to put


Right!  See for instance 
http://hg.sagemath.org/sage-main/file/9e29a3d84c48/sage/plot/plot.py#l1
and anything with a tilde, basically, like

:func:`~sage.plot.arrow.arrow`

this is how such links are created, see


Actually the hyperlink is created just from the :func: part, i.e., 
:func:`sage.plot.arrow.arrow` also creates a hyperlink.  The difference 
is that the text reads sage.plot.arrow.arrow() in this case, whereas 
with the tilde, the text just reads arrow().  The tilde just takes off 
the initial module part of the text so that it reads better.  The 
hyperlink is not affected, though.


You can also use :mod:, :func:, :data:, :const:, :class:, :meth:, 
:attr:, :exc:, and :obj:.  See 
http://sphinx.pocoo.org/domains.html#cross-referencing-python-objects


Thanks,

Jason

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Improving the documentation...

2011-11-23 Thread kcrisman


On Nov 23, 8:24 am, Jeroen Demeyer  wrote:
> On 2011-11-23 11:50, Florent Hivert wrote:
>
> > I'm also volunteering to
> > add a section about that in the developer guide. What do you think ?

See 
http://www.sagemath.org/doc/developer/sage_manuals.html#setting-hyperlink-to-modules-classes-methods-etc

> That would be very cool.  I have often thought about making "See Also"
> links, but I never know how to do it.  Of course, the "see also" links
> really should be hyperlinks.  Also, is it possible for example to put

Right!  See for instance 
http://hg.sagemath.org/sage-main/file/9e29a3d84c48/sage/plot/plot.py#l1
and anything with a tilde, basically, like

:func:`~sage.plot.arrow.arrow`

this is how such links are created, see

http://www.sagemath.org/doc/reference/sage/plot/plot.html

and clicking on 'arrow()' takes you to

http://www.sagemath.org/doc/reference/sage/plot/arrow.html#sage.plot.arrow.arrow

There are similar structures for modules, I think.

> links to the developer/installation guide?

Hmm, since those are basically separately generated, that might not be
possible.  Experts in the doc build, any ideas?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Improving the documentation...

2011-11-23 Thread Jeroen Demeyer
On 2011-11-23 11:50, Florent Hivert wrote:
> I'm also volunteering to
> add a section about that in the developer guide. What do you think ?

That would be very cool.  I have often thought about making "See Also"
links, but I never know how to do it.  Of course, the "see also" links
really should be hyperlinks.  Also, is it possible for example to put
links to the developer/installation guide?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Improving the documentation...

2011-11-23 Thread Florent Hivert
Hi there,

I think Sage documentation is quite good, but with a big flaw: it is
widely missing for cross links. Many classes and methods could greatly benefit
from a "SEE ALSO" section. I would like to advertise for this... If patch
writer and reviewer tries to more or less systematically add such a SEE ALSO
section, we could greatly improve Sage documentation. I'm also volunteering to
add a section about that in the developer guide. What do you think ?

Cheers,

Florent

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Segfault in DiGraph.automorphism_group

2011-11-23 Thread Nathann Cohen
H... On Sage 4.8-alpha2, when I add the line 

from sage.graphs.digraph import DiGraph

just after the line 

from finite_permutation_groups import FinitePermutationGroups

in categories/all.py

What I get is that Sage does not run anymore. 

[...lots of things ...]
/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/categories/all.py 
in ()
 40 from finite_permutation_groups import FinitePermutationGroups
 41 
---> 42 from sage.graphs.digraph import DiGraph
 43 
 44 # fields

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/digraph.py 
in ()
  9 from sage.misc.misc import deprecated_function_alias
 10 import sage.graphs.generic_graph_pyx as generic_graph_pyx
---> 11 from sage.graphs.generic_graph import GenericGraph
 12 from sage.graphs.dot2tex_utils import have_dot2tex
 13 

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.py
 
in ()
 11 from sage.rings.integer import Integer
 12 from sage.rings.rational import Rational
---> 13 from sage.groups.perm_gps.partn_ref.refinement_graphs import 
isomorphic, search_tree
 14 from generic_graph_pyx import GenericGraph_pyx, spring_layout_fast
 15 from sage.graphs.dot2tex_utils import assert_have_dot2tex

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/groups/perm_gps/__init__.py
 
in ()
> 1 
  2 
  3 import all
  4 
  5 

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/groups/perm_gps/all.py
 
in ()
 18 PermutationGroupMorphism = PermutationGroupMorphism_im_gens
 19 
---> 20 from cubegroup import CubeGroup, RubiksCube
 21 
 22 

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/groups/perm_gps/cubegroup.py
 
in ()
106 
107 
--> 108 from sage.plot.plot3d.shapes import Box
109 from sage.plot.plot3d.texture import Texture
110 

ImportError: cannot import name Box
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org