[sage-devel] Re: release of NZMATH 1.0 (system for number theory)

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 9:03 AM, NAKAMULA, Ken
 wrote:
> Dear number theorists,
>
> We are pleased to announce the release of NZMATH 1.0.
>
> NZMATH is a Python based system for number theory developed for six
> years.  Various modules useful for number theory are included in
> NZMATH package.  This time, we release its first stable version 1.0
> officially.  It can be used easily even for programming beginners.
> Please try it!
>
> Download
> 
> You can download NZMATH from [...]


And, since NZMATH is a Python library, you can also very easily use it
in Sage (http://sagemath.org).

sage: install_package('nzmath-1.0.0')
sage: import nzmath.prime
sage: nzmath.prime.nextPrime(1000)
1009
sage: import nzmath.matrix
sage: preparser(False)
sage: A = nzmath.matrix.Matrix(2, 2, [1, 2]+[5, 6]); A
[1, 2]+[5, 6]
sage: import nzmath.ecpp
/Users/wstein/sage/build/sage/local/lib/python2.6/site-packages/nzmath/real.py:214:
DeprecationWarning: RelativeError is deprecated
  warnings.warn(DeprecationWarning("RelativeError is deprecated"))
python(7449,0x7fff7093bbe0) malloc: *** mmap(size=14148475504058368)
failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
MemoryError

[[Bummer, since ECPP = Elliptic Curve Primality Proving is one thing I
know of that NZMATH has that Sage doesn't...]]

sage: import nzmath.round2
sage: nzmath.round2.round2([1,2,5,1])
([[Rational(1, 1), Rational(0, 1), Rational(0, 1)], [Rational(0, 1),
Rational(1, 1), Rational(0, 1)], [Rational(2, 3), Rational(0, 1),
Rational(1, 3)]], Rational(-31, 1))
sage: import nzmath.factor
sage: x = int(next_prime(10**5)*next_prime(10**12)); x
1303900117
sage: nzmath.factor.ecm.ecm(x)
13L
sage: nzmath.factor.find.trialDivision(x)
13
sage: nzmath.factor.mpqs.mpqs(x)
[(13L, 1), (10039L, 1)]
sage: import nzmath.permute
sage: nzmath.permute.PermGroup(['a','b','c','d','e'])
['a', 'b', 'c', 'd', 'e']


 -- William


-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Fwd: release of NZMATH 1.0 (system for number theory)

2010-06-06 Thread Mike Hansen
On Sun, Jun 6, 2010 at 7:40 PM, Alex Ghitza  wrote:
> I tried the spkg, and it appears to work fine.  I noticed that hg status
> was complaining about the files in src/, so I made a simple .hgignore to
> get rid of that.  I also added some more information to SPKG.txt.  The
> updated spkg is linked to on the ticket.

This has been merged as an optional spkg.

--Mike

-- 
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] Fwd: release of NZMATH 1.0 (system for number theory)

2010-06-06 Thread Alex Ghitza
On Sun, 6 Jun 2010 18:53:26 -0700, William Stein  wrote:
> I want to respond to this message with:
> 
> Try this in Sage by simply typing
> 
> sage: install_package('nzmath')
> sage: import nzmath
> sage: help(nzmath)
> sage: import nzmath.matrix
> sage: preparser(False)
> sage: nzmath.matrix.Matrix(2,3)
> /mnt/usb1/scratch/wstein/build/sage-4.4.3.rc0/local/lib/python2.6/site-packages/nzmath/config.py:181:
> UserWarning: please set NZMATHCONFDIR
>   warnings.warn("please set NZMATHCONFDIR")
> /mnt/usb1/scratch/wstein/build/sage-4.4.3.rc0/local/lib/python2.6/site-packages/nzmath/config.py:186:
> UserWarning: nzmathconf.py not found
>   warnings.warn("nzmathconf.py not found")
> [0, 0, 0]+[0, 0, 0]
> 
> etc...
> 
> but somebody has to review
> 
>http://trac.sagemath.org/sage_trac/ticket/9161
> 
> first.

Hi William,

I tried the spkg, and it appears to work fine.  I noticed that hg status
was complaining about the files in src/, so I made a simple .hgignore to
get rid of that.  I also added some more information to SPKG.txt.  The
updated spkg is linked to on the ticket.


Best,
Alex

-- 
Alex Ghitza -- http://aghitza.org/
Lecturer in Mathematics -- The University of Melbourne -- Australia

-- 
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: release of NZMATH 1.0 (system for number theory)

2010-06-06 Thread William Stein
I want to respond to this message with:

Try this in Sage by simply typing

sage: install_package('nzmath')
sage: import nzmath
sage: help(nzmath)
sage: import nzmath.matrix
sage: preparser(False)
sage: nzmath.matrix.Matrix(2,3)
/mnt/usb1/scratch/wstein/build/sage-4.4.3.rc0/local/lib/python2.6/site-packages/nzmath/config.py:181:
UserWarning: please set NZMATHCONFDIR
  warnings.warn("please set NZMATHCONFDIR")
/mnt/usb1/scratch/wstein/build/sage-4.4.3.rc0/local/lib/python2.6/site-packages/nzmath/config.py:186:
UserWarning: nzmathconf.py not found
  warnings.warn("nzmathconf.py not found")
[0, 0, 0]+[0, 0, 0]

etc...

but somebody has to review

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

first.


-- Forwarded message --
From: NAKAMULA, Ken 
Date: Sun, Jun 6, 2010 at 9:03 AM
Subject: release of NZMATH 1.0 (system for number theory)
To: nmbrt...@listserv.nodak.edu


Dear number theorists,

We are pleased to announce the release of NZMATH 1.0.

NZMATH is a Python based system for number theory developed for six
years.  Various modules useful for number theory are included in
NZMATH package.  This time, we release its first stable version 1.0
officially.  It can be used easily even for programming beginners.
Please try it!

NZMATH version 1.0 introduces many new features and many improvements
of functionality in the earlier versions.  Some of the highlights:

- support of algebraic number fields.
- TeX (PDF) documentations.
- elliptic curve primality proving (ECPP).
- refinement of polynomial factorization over the rational integers.
- configuration for external modules.

For a complete list of features and more informations, access to

http://tnt.math.metro-u.ac.jp/nzmath/

Download

You can download NZMATH from

http://downloads.sourceforge.net/nzmath/
http://tnt.math.metro-u.ac.jp/nzmath/

Mailing List

There is a mailing list to discuss about NZMATH among the users.
To join the mailing list, send a mail to

nzmath-user-requ...@tnt.math.metro-u.ac.jp

with only the next line in the message body.

subscribe

Project and Code Repository
===
NZMATH project is on SourceForge.net now.

http://sourceforge.net/projects/nzmath/

The latest source codes are provided by Mercurial.  Details are in

http://sourceforge.net/scm/?type=hg&group_id=171032

Development Centre
==
For more information or questions about NZMATH, contact:

 NZMATH development Group
 Department of Mathematics and Information Sciences
 Tokyo Metropolitan University
 1-1 Minami-osawa
 Hachioji, Tokyo
 1920397, JAPAN

e-Mail:  nzmath-supp...@tnt.math.metro-u.ac.jp
Tel   :  +81 42 677 2463
Fax   :  +81 42 677 2481

Supervisor:  NAKAMULA, Ken / Chief Developer:  TANAKA, Satoru
(The chief developer of NZMATH has changed from former MATSUI,
Tetsushi, to TANAKA, Satoru, in April, 2010.)

--
Prof.Dr.NAKAMULA,Ken;_Math._Inf._Sci.,_Tokyo_Metropolitan_Univ.,_Japan
URL_
EML__FAX_<+81-(0)42-677-2481>
CELL_<+81-(0)90-1692-3716>___TEL_<+81-(0)42-677-ext3165or3164>
--



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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: Is 'flex' needed to build Sage?

2010-06-06 Thread leif
On 7 Jun., 02:02, William Stein  wrote:
> On Sun, Jun 6, 2010 at 4:35 PM, leif  wrote:
> > I thought in this thread we were only talking about its build system,
> > not the source code or Singular's quality in general.
>
> > I cannot resist to give some excerpts from just src/Singular/
> > Makefile.in:
>
> > ##
> > ## various programs
> > ##
> > @SET_MAKE@
> > CC              = @CC@
> > LD              = @LD@
> > CXX             = @CXX@
> > LEX             = sh flexer.sh
>
> > PERL            = @PERL@
> > BISON           = bison
> > INSTALL         = @INSTALL@
> > INSTALL_PROGRAM = @INSTALL_PROGRAM@
> > INSTALL_DATA    = @INSTALL_DATA@
> > MKINSTALLDIRS   = ./mkinstalldirs
> > LN_S            = @LN_S@
>
> > ...
>
> > SOURCES=${CSOURCES} ${CXXSOURCES} \
> >        grammar.y scanner.l libparse.l \
> >        utils.cc utils.h \
> >        tesths.cc mpsr_Tok.cc claptmpl.cc
>
> > ...
>
> > ##
> > ## Build Targets
> > ##
> > .l.cc:
> >       �...@if test -r scanner.cc; then \
> >                touch scanner.cc ;\
> >        elif test "x${LEX}" = x; then \
> >                echo Error: no lex given, could not rebuilt scanner.cc;\
> >                exit 1; \
> >        fi
> >        ${LEX} -s -I -t $< > scanner.cc.lmp
> >        cp scanner.cc.lmp scanner.cc
>
> > .y.cc:
> >       �...@if test -r grammar.cc; then \
> >                touch grammar.cc ;\
> >        else \
> >        if test "x${BISON}" = x; then \
> >                echo Error: no bison given, could not rebuilt grammar.cc;\
> >                exit 1; \
> >        fi;\
> >        ${BISON} -d -t -o grammar.cc $<;\
> >        chmod +x testgh;\
> >        ./testgh;\
> >        fi
>
> > Note that these are all from the same file. You could also take a look
> > at flexer.sh...
>
> > -Leif
>
> To make your complaints clearer and more *constructive*, I wonder if
> you could explain roughly how you would rewrite the above code?

We agreed that we will only do the simple workaround at #9160 s.t. it
builds on Solaris (too) at the moment.
(By the way, I did not complain.)

There's of course room for another ticket.

What's wrong with the above snippets should be clear to everyone
interested... ;-)

First of all, if you use configure/autotools, don't hardcode lex and
yacc (in this case, actually bison and a shell script that just deals
with different versions of flex, and does not even test if or where
flex is present).
Less of a problem if up-to-date versions of the generated files are
shipped to "end users" (with correct m-times; as said before, in
general ordinary users shouldn't need "developer tools" like lex&yacc
or autotools).

The assumption that there is only one source file matching the .l.cc
rule is false.
That rule has a "misplaced" if-elif-fi.

Both rules assume that any present generated file is always up-to-
date.


-Leif

-- 
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: Is 'flex' needed to build Sage?

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 5:06 PM, François Bissey  wrote:
>> I'm sure Singular has a process to fix the problems you mention.
>> All you have to do is send a 'diff -Naur' patch that improves the build.
>>
>> You got hundreds of megabytes of code for free and you're complaining
>> because the install script isn't written the way you advocate?
>>
>> Advocacy is volunteering.
>>
>> Send them a thank-you note for all the free code and include a patch file.
>>
>> Tim
>>
>> "Open source... now it's YOUR problem to solve" -- daly
> OK I sympathise, that's in the same line as
> "there are two groups of people: those who can and those who complain"
> I volunteer and try to do stuff but while I can see some problems I am not
> necessarily competent to do something about it.
> Actually in the case of singular I may end up making it worse.

+1

I would like to very strongly encourage people to complain about
anything they find very frustrating in Sage, since it is difficult to
know what to fix without these complaints.   This sort of user
feedback is extremely valuable, especially from users who aren't
capable of contributing back.

You can use this link to complain anonymously:

http://spreadsheets.google.com/viewform?key=pCwvGVwSMxTzT6E2xNdo5fA

I'll try to be as constructive as possible with my complaints about
upstream components though.  In the past, I've sometimes not done so,
and always regretted it.

> But I think the singular spkg can be improved and that I think I can do.
> I will certainly have a shoot, once I have marked the 200 copies that are
> coming my way in the next week.

Cool, thanks!   And if nothing else you can post some of your findings to

   http://wiki.sagemath.org/days23.5

so somebody like me can think about this at the Sage/Singular sage days.

William

>
> Francois
>
> --
> 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
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Re: Is 'flex' needed to build Sage?

2010-06-06 Thread François Bissey
> I'm sure Singular has a process to fix the problems you mention.
> All you have to do is send a 'diff -Naur' patch that improves the build.
> 
> You got hundreds of megabytes of code for free and you're complaining
> because the install script isn't written the way you advocate?
> 
> Advocacy is volunteering.
> 
> Send them a thank-you note for all the free code and include a patch file.
> 
> Tim
> 
> "Open source... now it's YOUR problem to solve" -- daly
OK I sympathise, that's in the same line as 
"there are two groups of people: those who can and those who complain"
I volunteer and try to do stuff but while I can see some problems I am not
necessarily competent to do something about it.
Actually in the case of singular I may end up making it worse.

But I think the singular spkg can be improved and that I think I can do.
I will certainly have a shoot, once I have marked the 200 copies that are
coming my way in the next week.

Francois 

-- 
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: Is 'flex' needed to build Sage?

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 4:35 PM, leif  wrote:
> On 7 Jun., 01:19, William Stein  wrote:
>> On Sun, Jun 6, 2010 at 4:10 PM, Dr. David Kirkby
>>
>>  wrote:
>> > On 06/ 6/10 11:48 PM, François Bissey wrote:
>>
>> >> yes singular is a downright mess, upstream and in sage.
>>
>> > I'm glad I'm not alone in my view.
>>
>> I just want to clarify something again (which David already
>> clarified): you guys are both talking about the build system, and I'm
>> talking only about the C++ source code.   So we aren't disagreeing.
>
> I thought in this thread we were only talking about its build system,
> not the source code or Singular's quality in general.
>
> I cannot resist to give some excerpts from just src/Singular/
> Makefile.in:
>
> ##
> ## various programs
> ##
> @SET_MAKE@
> CC              = @CC@
> LD              = @LD@
> CXX             = @CXX@
> LEX             = sh flexer.sh
>
> PERL            = @PERL@
> BISON           = bison
> INSTALL         = @INSTALL@
> INSTALL_PROGRAM = @INSTALL_PROGRAM@
> INSTALL_DATA    = @INSTALL_DATA@
> MKINSTALLDIRS   = ./mkinstalldirs
> LN_S            = @LN_S@
>
> ...
>
> SOURCES=${CSOURCES} ${CXXSOURCES} \
>        grammar.y scanner.l libparse.l \
>        utils.cc utils.h \
>        tesths.cc mpsr_Tok.cc claptmpl.cc
>
> ...
>
> ##
> ## Build Targets
> ##
> .l.cc:
>       �...@if test -r scanner.cc; then \
>                touch scanner.cc ;\
>        elif test "x${LEX}" = x; then \
>                echo Error: no lex given, could not rebuilt scanner.cc;\
>                exit 1; \
>        fi
>        ${LEX} -s -I -t $< > scanner.cc.lmp
>        cp scanner.cc.lmp scanner.cc
>
> .y.cc:
>       �...@if test -r grammar.cc; then \
>                touch grammar.cc ;\
>        else \
>        if test "x${BISON}" = x; then \
>                echo Error: no bison given, could not rebuilt grammar.cc;\
>                exit 1; \
>        fi;\
>        ${BISON} -d -t -o grammar.cc $<;\
>        chmod +x testgh;\
>        ./testgh;\
>        fi
>
> Note that these are all from the same file. You could also take a look
> at flexer.sh...
>
> -Leif

To make your complaints clearer and more *constructive*, I wonder if
you could explain roughly how you would rewrite the above code?

 -- William


-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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: Is 'flex' needed to build Sage?

2010-06-06 Thread leif
On 7 Jun., 01:29, Tim Daly  wrote:
> I'm sure Singular has a process to fix the problems you mention.
> All you have to do is send a 'diff -Naur' patch that improves the build.

Of course. But the current workaround just happens in spkg-install.

> You got hundreds of megabytes of code for free and you're complaining
> because the install script isn't written the way you advocate?

Tell this some Sage users if they complain... ;-)
(Especially in the context of MS Windows/Cygwin.)

> "Open source... now it's YOUR problem to solve" -- daly

There are commercial products you're more left alone with (or pay much
for support hotlines).


-Leif

-- 
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: Is 'flex' needed to build Sage?

2010-06-06 Thread leif
On 7 Jun., 01:19, William Stein  wrote:
> On Sun, Jun 6, 2010 at 4:10 PM, Dr. David Kirkby
>
>  wrote:
> > On 06/ 6/10 11:48 PM, François Bissey wrote:
>
> >> yes singular is a downright mess, upstream and in sage.
>
> > I'm glad I'm not alone in my view.
>
> I just want to clarify something again (which David already
> clarified): you guys are both talking about the build system, and I'm
> talking only about the C++ source code.   So we aren't disagreeing.

I thought in this thread we were only talking about its build system,
not the source code or Singular's quality in general.

I cannot resist to give some excerpts from just src/Singular/
Makefile.in:

##
## various programs
##
@SET_MAKE@
CC  = @CC@
LD  = @LD@
CXX = @CXX@
LEX = sh flexer.sh

PERL= @PERL@
BISON   = bison
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA= @INSTALL_DATA@
MKINSTALLDIRS   = ./mkinstalldirs
LN_S= @LN_S@

...

SOURCES=${CSOURCES} ${CXXSOURCES} \
grammar.y scanner.l libparse.l \
utils.cc utils.h \
tesths.cc mpsr_Tok.cc claptmpl.cc

...

##
## Build Targets
##
.l.cc:
@if test -r scanner.cc; then \
touch scanner.cc ;\
elif test "x${LEX}" = x; then \
echo Error: no lex given, could not rebuilt scanner.cc;\
exit 1; \
fi
${LEX} -s -I -t $< > scanner.cc.lmp
cp scanner.cc.lmp scanner.cc

.y.cc:
@if test -r grammar.cc; then \
touch grammar.cc ;\
else \
if test "x${BISON}" = x; then \
echo Error: no bison given, could not rebuilt grammar.cc;\
exit 1; \
fi;\
${BISON} -d -t -o grammar.cc $<;\
chmod +x testgh;\
./testgh;\
fi

Note that these are all from the same file. You could also take a look
at flexer.sh...

-Leif

-- 
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: Is 'flex' needed to build Sage?

2010-06-06 Thread Tim Daly

I'm sure Singular has a process to fix the problems you mention.
All you have to do is send a 'diff -Naur' patch that improves the build.

You got hundreds of megabytes of code for free and you're complaining
because the install script isn't written the way you advocate?

Advocacy is volunteering.

Send them a thank-you note for all the free code and include a patch file.

Tim

"Open source... now it's YOUR problem to solve" -- daly

Dr. David Kirkby wrote:

On 06/ 6/10 11:48 PM, François Bissey wrote:


yes singular is a downright mess, upstream and in sage.


I'm glad I'm not alone in my view.


Apart from moving to the latest upstream I think the singular spkg
is due for a spring clean. It build an enormous amount of targets
in a way that looks like a very careful choreography and apart
from libsingular and the singular binary there is no indication
sage uses any of the other stuff built.


It does take a long time to build compared to most other packages, 
which is probably due to the fact the package is large and so has a 
lot of source code.


If a lot of the targets are unnecessary, then I suspect the build time 
could be reduced. It took 40 minutes on my old 900 MHz SPARC, though I 
could probably reduce that if targets can be built in parallel. But 
even then, it is still going to be quite lengthy.


I have just read William's opinion and it may be true that is 
generally easy
to build. But reproducing the set up used in the sage spkg from a 
packaging

point of view is quite difficult.



Francois



Dave



--
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: Is 'flex' needed to build Sage?

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 4:10 PM, Dr. David Kirkby
 wrote:
> On 06/ 6/10 11:48 PM, François Bissey wrote:
>
>> yes singular is a downright mess, upstream and in sage.
>
> I'm glad I'm not alone in my view.

I just want to clarify something again (which David already
clarified): you guys are both talking about the build system, and I'm
talking only about the C++ source code.   So we aren't disagreeing.

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Re: Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 11:48 PM, François Bissey wrote:


yes singular is a downright mess, upstream and in sage.


I'm glad I'm not alone in my view.


Apart from moving to the latest upstream I think the singular spkg
is due for a spring clean. It build an enormous amount of targets
in a way that looks like a very careful choreography and apart
from libsingular and the singular binary there is no indication
sage uses any of the other stuff built.


It does take a long time to build compared to most other packages, which is 
probably due to the fact the package is large and so has a lot of source code.


If a lot of the targets are unnecessary, then I suspect the build time could be 
reduced. It took 40 minutes on my old 900 MHz SPARC, though I could probably 
reduce that if targets can be built in parallel. But even then, it is still 
going to be quite lengthy.



I have just read William's opinion and it may be true that is generally easy
to build. But reproducing the set up used in the sage spkg from a packaging
point of view is quite difficult.



Francois



Dave

--
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: Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 11:39 PM, William Stein wrote:


In case anybody from Singular is reading this -- the above is the
opinion of David and not the Sage project as a whole.  I'll add that,
in my experience, Singular is fairly easy to build and portable, more
so than many other programs.   When I've personally poked around in
the Singular source code and actually tried to understand the code,
it's been surprisingly easy to understand, compared to many other
sophisticated C++ programs.


That may be true, but the build process is far from clean.

Type
$ configure
$ make
$ make distclean

and it appears to delete a load of files. Then type:

$ configure
$ make

and it reports:

make: `/tmp/Singular-3-1-1/ix86-SunOS/Singular-3-1-1' is up to date.

in other words, the 'make distclean' is not cleaning things properly. There is 
no 'make check' or 'make test'. The configure script silently ignores what 
appear to be unsupported options like '--without-bison'


I've not looked at the C/C++ source code, but accept it might be quite clear. 
The build process is far from clean.


The spkg-install in Sage is also rather messy, with tons of options that are not 
listed by the configure script as being valid options.



Regarding multiple copies of install-sh, please note that like Sage,
Singular is built up from other libraries and components.   One could
criticize Sage on the same grounds for including multiple copies of
various autoconf scripts in the various src/ subdirectories of spkg's.


As such, I think this hack is the best we can do.

It at least allows Sage to build when flex is not installed.


I think using touch is reasonable given the circumstances.


Me too.

Dave

--
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: Is 'flex' needed to build Sage?

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 3:48 PM, François Bissey  wrote:
>> I've tested on multiple Solaris systems, both with and without 'flex' in
>> the  path - see trac ticket for further details.
>>
>> The more I look at the Singular package in Sage, the more I realise it is
>> a  complete mess. There are 5 copies of install-sh for example. Sage's
>> spkg-install has options that are not listed as options to the Singular
>> 'configure' script, and don't do what their names imply (i.e.
>> --without-bison and --without-lex).
>>
>> I've just downloaded the latest Singular source, and that is no less of a
>> mess.  So both Sage's spkg-install and the current Singular source code
>> are a bit poor in my honest opinion.
>>
>> As such, I think this hack is the best we can do.
>>
>> It at least allows Sage to build when flex is not installed.
> yes singular is a downright mess, upstream and in sage.
> Apart from moving to the latest upstream I think the singular spkg
> is due for a spring clean. It build an enormous amount of targets
> in a way that looks like a very careful choreography and apart
> from libsingular and the singular binary there is no indication
> sage uses any of the other stuff built.
>
> I have just read William's opinion and it may be true that is generally easy
> to build. But reproducing the set up used in the sage spkg from a packaging
> point of view is quite difficult.

My main point is that it can be unduly offensive to criticize software
quality based purely on looking for a few minutes and deciding it
looks complicated or ugly.  I think one has to take a broader view and
consider how the software works in practice, how easy it is to
understand when you're seriously interesting in hacking on the code,
etc.

A huge amount of effort has gone into Singular, and I greatly
appreciate that it is open source.  I think the Sage project has a
very good relationship with the Singular project, and I hope criticism
of the quality of their work will be constructive and not offensive.
That's all.

It would be cool if some the ideas you guys have could be added to
http://wiki.sagemath.org/days23.5
which is the joint Sage/Singular meeting this summer.

 -- William



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Re: Is 'flex' needed to build Sage?

2010-06-06 Thread François Bissey
> I've tested on multiple Solaris systems, both with and without 'flex' in
> the  path - see trac ticket for further details.
> 
> The more I look at the Singular package in Sage, the more I realise it is
> a  complete mess. There are 5 copies of install-sh for example. Sage's
> spkg-install has options that are not listed as options to the Singular
> 'configure' script, and don't do what their names imply (i.e.
> --without-bison and --without-lex).
> 
> I've just downloaded the latest Singular source, and that is no less of a
> mess.  So both Sage's spkg-install and the current Singular source code
> are a bit poor in my honest opinion.
> 
> As such, I think this hack is the best we can do.
> 
> It at least allows Sage to build when flex is not installed.
yes singular is a downright mess, upstream and in sage.
Apart from moving to the latest upstream I think the singular spkg
is due for a spring clean. It build an enormous amount of targets 
in a way that looks like a very careful choreography and apart 
from libsingular and the singular binary there is no indication
sage uses any of the other stuff built.

I have just read William's opinion and it may be true that is generally easy 
to build. But reproducing the set up used in the sage spkg from a packaging 
point of view is quite difficult.

Francois

-- 
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: Is 'flex' needed to build Sage?

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 3:27 PM, Dr. David Kirkby
 wrote:
> On 06/ 6/10 07:29 PM, leif wrote:
>>
>> On 6 Jun., 19:02, "Dr. David Kirkby"  wrote:
>
>>> Could I twist your arm to review the changes?
>>
>> Be a little patient, awaiting 4.4.4.alpha0...
>> (And in principle the patch should be tested on other Solaris systems,
>> too... I currently can only give it a "Linux-ok" - as soon as the
>> sysloads drop reasonably...)
>>
>>
>> -Leif
>>
>
> I've tested on multiple Solaris systems, both with and without 'flex' in the
> path - see trac ticket for further details.
>
> The more I look at the Singular package in Sage, the more I realise it is a
> complete mess. There are 5 copies of install-sh for example. Sage's
> spkg-install has options that are not listed as options to the Singular
> 'configure' script, and don't do what their names imply (i.e.
> --without-bison and --without-lex).
>
> I've just downloaded the latest Singular source, and that is no less of a
> mess. So both Sage's spkg-install and the current Singular source code are a
> bit poor in my honest opinion.
^^

In case anybody from Singular is reading this -- the above is the
opinion of David and not the Sage project as a whole.  I'll add that,
in my experience, Singular is fairly easy to build and portable, more
so than many other programs.   When I've personally poked around in
the Singular source code and actually tried to understand the code,
it's been surprisingly easy to understand, compared to many other
sophisticated C++ programs.

Regarding multiple copies of install-sh, please note that like Sage,
Singular is built up from other libraries and components.   One could
criticize Sage on the same grounds for including multiple copies of
various autoconf scripts in the various src/ subdirectories of spkg's.

> As such, I think this hack is the best we can do.
>
> It at least allows Sage to build when flex is not installed.

I think using touch is reasonable given the circumstances.

 -- William

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Re: Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 07:29 PM, leif wrote:

On 6 Jun., 19:02, "Dr. David Kirkby"  wrote:



Could I twist your arm to review the changes?


Be a little patient, awaiting 4.4.4.alpha0...
(And in principle the patch should be tested on other Solaris systems,
too... I currently can only give it a "Linux-ok" - as soon as the
sysloads drop reasonably...)


-Leif



I've tested on multiple Solaris systems, both with and without 'flex' in the 
path - see trac ticket for further details.


The more I look at the Singular package in Sage, the more I realise it is a 
complete mess. There are 5 copies of install-sh for example. Sage's spkg-install 
has options that are not listed as options to the Singular 'configure' script, 
and don't do what their names imply (i.e. --without-bison and --without-lex).


I've just downloaded the latest Singular source, and that is no less of a mess. 
So both Sage's spkg-install and the current Singular source code are a bit poor 
in my honest opinion.


As such, I think this hack is the best we can do.

It at least allows Sage to build when flex is not installed.

Dave

--
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: Is 'flex' needed to build Sage?

2010-06-06 Thread leif
On 6 Jun., 19:02, "Dr. David Kirkby"  wrote:
> On 06/ 6/10 04:43 PM, leif wrote:
> > [1]http://www.sagemath.org/doc/developer/disseminating_code.html#dissemi...
> > [2]http://www.sagemath.org/doc/developer/producing_spkgs.html#producing-...
> > [3]http://www.sagemath.org/doc/developer/patching_spkgs.html#patching-a-...
>
> The section "Disseminating Code for Sage" does seem rather mis-placed to me,
> though I can't think of how I would improve it.

Most probably Minh will have some good ideas.. :)

> Things like creating .spkg's should arguably not be subsections of
> "Disseminating Code for Sage"
>
> The section about .spkg's called "Avoiding trouble" could certainly do with
> expansion on these issues.

Thought of that, too, but it should be in both subsections :-/

> http://www.sagemath.org/doc/developer/producing_spkgs.html#avoiding-t...
>
> It's only seven sentences long. It should certainly state that programs used 
> by
> developers (yacc, lex, bison, flex, autoconf, automake should not be assumed 
> to
> be available). However, from discussions on sage-support, the optional package
> Lie needs bison. Perhaps the bison output for that could be added into the
> package, so one does not need bison. I don't know how practical that would be,
> and given it is an optional package and has a more fundamental flaw, I can't 
> be
> bothered to try to do anything about that - installing bison would be easiest.

Just for the record, some packages (I don't think in Sage) require
skeleton files or even libraries, too (i.e. providing the pregenerated
files does not always suffice).

> I doubt however there is much a Sage developer could have done to notice the
> problem with Singular.

make -n ? ;-) (aka --dry-run)

(Obviously this depends on the system as well; usually one had to
run ./configure before...)

perhaps grep  in (test) install.log
(testing on mostly vanilla "user" installations is another option)

> In general, they are not going to look into the source
> code of the individual packages, and compare time stamps on files. Even if 
> they
> do, with 'ls -l' they are not going to see that a file is one second older 
> than
> another, as the dates are back in 2008 and this information is not shown in 
> the
> normal output of 'ls'. How many of them will know what 'yacc' and 'lex' do
> anyway? (Or their GNU clones 'bison' and 'flex').
>
> Some things I look at in Sage and wonder how anyone could be so stupid to 
> miss.
> In this case, I don't think any Sage developer can be blamed. I suspect they
> have untarred the Singular source code, so the dates have remained what they
> originally were.
>
> Anyway, it is good that it is found.

Yes, but "touch" in spkg-install is an ugly workaround (to be removed
in the long run), not a bugfix. ;-)


> Could I twist your arm to review the changes?

Be a little patient, awaiting 4.4.4.alpha0...
(And in principle the patch should be tested on other Solaris systems,
too... I currently can only give it a "Linux-ok" - as soon as the
sysloads drop reasonably...)


-Leif

-- 
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: ANN: mpmath 0.15 released

2010-06-06 Thread Ondrej Certik
On Sun, Jun 6, 2010 at 8:25 AM, Fredrik Johansson
 wrote:
> Hi all,
>
> Version 0.15 of mpmath is now available on the website:
> http://code.google.com/p/mpmath/
>
> It can also be downloaded from the Python Package Index:
> http://pypi.python.org/pypi/mpmath/0.15
>
> Mpmath is a pure-Python library for arbitrary-precision floating-point
> arithmetic that implements an extensive set of mathematical functions. It
> can be used as a standalone library or via SymPy
> (http://code.google.com/p/sympy/), and is also available as a standard
> component of Sage (http://sagemath.org/). The versions in Sage
> and SymPy will be updated soon.
>
> For details about the new features in this version, see the following
> blog post and the changelog:
> http://fredrik-j.blogspot.com/2010/06/announcing-mpmath-015.html
> http://mpmath.googlecode.com/svn/tags/0.15/CHANGES
>
> Briefly, besides many small fixes, 0.15 includes large performance
> improvements for transcendental functions, new code for computing the
> nontrivial zeros of the Riemann zeta function (contributed by
> Juan Arias de Reyna), and many new special functions (including
> generalized 2D hypergeometric series, q-functions, and new
> elliptic functions). Support for complex interval arithmetic
> has also been added.
>
> Extensive documentation is available at:
> http://mpmath.googlecode.com/svn/trunk/doc/build/index.html (or
> equivalently)
> http://mpmath.googlecode.com/svn/tags/0.15/doc/build/index.html
>
> Bug reports and other comments are welcome on the issue tracker at
> http://code.google.com/p/mpmath/issues/list or the mpmath mailing list:
> http://groups.google.com/group/mpmath

Congratulations! Also good luck for the summer. What kind of special
functions will you be working on?

Ondrej

-- 
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: Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 04:43 PM, leif wrote:

On 6 Jun., 12:27, Willem Jan Palenstijn  wrote:

The way this usually works is that packages are shipped with the output of
flex, so that flex doesn't have to be run again if the user doesn't have it.


This is a more general problem ([f]lex and yacc/bison are just
examples; the auto-tools are another one).

Anyone who includes/updates an spkg should make sure that no
"developer tools" are required to perform a conventional "user" build/
install, i.e.:

  - the pregenerated files are included in the source tarball,
  - file modification times do not cause unintended dependencies/
rebuild of provided files.

Unfortunately the sections on spkgs in the Developer's Guide have been
split into creation of new and update/patching of existing spkgs
("Producing New Sage Packages" [2], "Patching a Sage Package" [3]);
I'm not sure if everybody will read the introductory "Disseminating
Code for Sage" [1]. Perhaps a hint in potentially affected spkgs'
SPKG.txt wouldn't be bad, too.

(The file permissions/ownership issue could also be mentioned in these
sections.)


-Leif


[1] 
http://www.sagemath.org/doc/developer/disseminating_code.html#disseminating-code-for-sage
[2] 
http://www.sagemath.org/doc/developer/producing_spkgs.html#producing-new-sage-packages
[3] 
http://www.sagemath.org/doc/developer/patching_spkgs.html#patching-a-sage-package

The section "Disseminating Code for Sage" does seem rather mis-placed to me, 
though I can't think of how I would improve it.


Things like creating .spkg's should arguably not be subsections of 
"Disseminating Code for Sage"


The section about .spkg's called "Avoiding trouble" could certainly do with 
expansion on these issues.


http://www.sagemath.org/doc/developer/producing_spkgs.html#avoiding-troubles

It's only seven sentences long. It should certainly state that programs used by 
developers (yacc, lex, bison, flex, autoconf, automake should not be assumed to 
be available). However, from discussions on sage-support, the optional package 
Lie needs bison. Perhaps the bison output for that could be added into the 
package, so one does not need bison. I don't know how practical that would be, 
and given it is an optional package and has a more fundamental flaw, I can't be 
bothered to try to do anything about that - installing bison would be easiest.


I doubt however there is much a Sage developer could have done to notice the 
problem with Singular. In general, they are not going to look into the source 
code of the individual packages, and compare time stamps on files. Even if they 
do, with 'ls -l' they are not going to see that a file is one second older than 
another, as the dates are back in 2008 and this information is not shown in the 
normal output of 'ls'. How many of them will know what 'yacc' and 'lex' do 
anyway? (Or their GNU clones 'bison' and 'flex').


Some things I look at in Sage and wonder how anyone could be so stupid to miss. 
In this case, I don't think any Sage developer can be blamed. I suspect they 
have untarred the Singular source code, so the dates have remained what they 
originally were.


Anyway, it is good that it is found.

Could I twist your arm to review the changes?

Dave

--
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: Is 'flex' needed to build Sage?

2010-06-06 Thread leif
On 6 Jun., 12:27, Willem Jan Palenstijn  wrote:
> On Sun, Jun 06, 2010 at 09:14:09AM +0100, Dr. David Kirkby wrote:
> > I've tried twice to build Sage on a machine in which 'flex' was not in
> > the path. It has both times failed with:
>
> > make install in Singular
> > make[4]: Entering directory  
> > `/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'
> > sh flexer.sh -I -Pyylp -t libparse.l >libparse.cc.lmp
> > flexer.sh: flex: not found
> > flexer.sh: test: argument expected
> > make[4]: *** [libparse.cc] Error 1
>
> > So is flex a requirement to build Sage? If it is, then I'll add to the
> > 'prereq' script a test for flex. If, which I doubt, it is only needed on
> > Solaris, then I'll make the test specific to Solaris.
>
> The way this usually works is that packages are shipped with the output of
> flex, so that flex doesn't have to be run again if the user doesn't have it.

This is a more general problem ([f]lex and yacc/bison are just
examples; the auto-tools are another one).

Anyone who includes/updates an spkg should make sure that no
"developer tools" are required to perform a conventional "user" build/
install, i.e.:

 - the pregenerated files are included in the source tarball,
 - file modification times do not cause unintended dependencies/
rebuild of provided files.

Unfortunately the sections on spkgs in the Developer's Guide have been
split into creation of new and update/patching of existing spkgs
("Producing New Sage Packages" [2], "Patching a Sage Package" [3]);
I'm not sure if everybody will read the introductory "Disseminating
Code for Sage" [1]. Perhaps a hint in potentially affected spkgs'
SPKG.txt wouldn't be bad, too.

(The file permissions/ownership issue could also be mentioned in these
sections.)


-Leif


[1] 
http://www.sagemath.org/doc/developer/disseminating_code.html#disseminating-code-for-sage
[2] 
http://www.sagemath.org/doc/developer/producing_spkgs.html#producing-new-sage-packages
[3] 
http://www.sagemath.org/doc/developer/patching_spkgs.html#patching-a-sage-package

-- 
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] ANN: mpmath 0.15 released

2010-06-06 Thread Fredrik Johansson
Hi all,

Version 0.15 of mpmath is now available on the website:
http://code.google.com/p/mpmath/

It can also be downloaded from the Python Package Index:
http://pypi.python.org/pypi/mpmath/0.15

Mpmath is a pure-Python library for arbitrary-precision floating-point
arithmetic that implements an extensive set of mathematical functions. It
can be used as a standalone library or via SymPy
(http://code.google.com/p/sympy/), and is also available as a standard
component of Sage (http://sagemath.org/). The versions in Sage
and SymPy will be updated soon.

For details about the new features in this version, see the following
blog post and the changelog:
http://fredrik-j.blogspot.com/2010/06/announcing-mpmath-015.html
http://mpmath.googlecode.com/svn/tags/0.15/CHANGES

Briefly, besides many small fixes, 0.15 includes large performance
improvements for transcendental functions, new code for computing the
nontrivial zeros of the Riemann zeta function (contributed by
Juan Arias de Reyna), and many new special functions (including
generalized 2D hypergeometric series, q-functions, and new
elliptic functions). Support for complex interval arithmetic
has also been added.

Extensive documentation is available at:
http://mpmath.googlecode.com/svn/trunk/doc/build/index.html (or
equivalently)
http://mpmath.googlecode.com/svn/tags/0.15/doc/build/index.html

Bug reports and other comments are welcome on the issue tracker at
http://code.google.com/p/mpmath/issues/list or the mpmath mailing list:
http://groups.google.com/group/mpmath

Enjoy,
Fredrik Johansson

-- 
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: Doctest hang in very strange way.

2010-06-06 Thread leif
On 6 Jun., 15:31, "Dr. David Kirkby"  wrote:
> I've build Sage 4.4.3 on a Sun Blade 1000 but when running the long doctests,
> the output appears to hang. But the actual doctest command is not shown 
> properly.
>
> First the output of 'make ptestlong' showed this:
>
> sage -t  -long devel/sage/sage/modular/abvar/lseries.py
>          [10.2 s]
> sage -t  -long devel/sage/sage/modular/abvar/homspace.py
>          [171.9 s]
> sage -t  -long devel/s
>
> then on another occasion it stalled at the same place.
>
> sage -t  -long devel/sage/sage/modular/abvar/lseries.py
>          [10.2 s]
> sage -t  -long devel/sage/sage/modular/abvar/homspace.py
>          [171.8 s]
> sage -t  -long devel/sa

The output buffer isn't flushed. You could try "-verbose" to get
closer to the doctest actually hanging.


-Leif



> I wondered if this could be a lack of memory (the machine only has 2 GB), but
> there are no messages about a lack of memory, vmstat shows a low scan rate 
> (sr)
>
> drkir...@redstart:~$ vmstat 10
>   kthr      memory            page            disk          faults      cpu
>   r b w   swap  free  re  mf pi po fr de sr s6 sd -- --   in   sy   cs us sy 
> id
>   0 0 0 9845200 1634144 306 1476 16 78 77 0 1 0 9  0  0  255 2852  214 46  6 
> 49
>   0 0 0 9675816 1384296 80 1136 0 3 3  0  0  0  0  0  0  302 7307  174 92  8  > 0
>   0 0 0 9679088 1385816 84 1187 0 0 0  0  0  0 25  0  0  334 8152  204 92  8  > 0
>   0 0 0 9671840 1380712 77 1121 0 1 1  0  0  0  0  0  0  301 7284  176 92  7  > 0
>   0 0 0 9614728 1373816 71 695 0 0  0  0  0  0  0  0  0  287 5485  170 93  6  > 0
>   0 0 0 9675328 1383760 78 1187 0 3 3  0  0  0  7  0  0  301 7694  175 92  8  > 0
>   0 0 0 9637248 1352144 15 365 0 0  0  0  0  0 17  0  0  325 1461  191 98  2  > 0
>   0 0 0 9634304 1348968 0  4  0  0  0  0  0  0  0  0  0  301  207  171 99  1  > 0
>
> and 'prstat' does not show excessive memory usage by anything.
>
>     PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
>   20550 drkirkby  209M  137M run     20    0   0:26:09  49% python/1
>   20797 drkirkby  168M   97M cpu0    10    0   0:06:34  50% python/1
>   15601 drkirkby 9528K 7896K sleep   59    0   0:00:08 0.0% python/3
>   20795 drkirkby 8704K 6352K sleep   59    0   0:00:00 0.0% python/1
>   20548 drkirkby 8664K 6312K sleep   59    0   0:00:01 0.0% python/1
>   19006 drkirkby 6728K 5160K sleep   59    0   0:00:00 0.0% python/1
>   20716 root     8416K 4816K sleep   59    0   0:00:00 0.0% sshd/1
>   20377 root     8408K 4352K sleep   59    0   0:00:00 0.0% sshd/1
>   15602 drkirkby 9072K 4120K sleep   59    0   0:00:01 0.0% python/1
>   15603 drkirkby 9072K 4120K sleep   59    0   0:00:01 0.0% python/1
>   20869 drkirkby 4496K 4104K cpu1    39    0   0:00:00 0.1% prstat/1
>     499 root     9192K 3424K sleep   59    0   0:00:02 0.0% snmpd/1
>      88 root     4320K 2984K sleep   59    0   0:00:11 0.0% nscd/26
>     306 root     5344K 2920K sleep   59    0   0:00:03 0.0% fmd/12
>   20723 drkirkby 8192K 2736K sleep   59    0   0:00:00 0.0% sshd/1
> Total: 59 processes, 164 lwps, load averages: 2.01, 2.01, 2.03
>
> Has anyone got any ideas?
>
> Dave

-- 
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 09:18 AM, Mike Hansen wrote:

On Sun, Jun 6, 2010 at 1:14 AM, Dr. David Kirkby
  wrote:

So is flex a requirement to build Sage? If it is, then I'll add to the
'prereq' script a test for flex. If, which I doubt, it is only needed on
Solaris, then I'll make the test specific to Solaris.


For what it's worth, Sage / Singular builds on Cygwin where "flex"
does not seem to be installed.

Another thing which needs to be added to prereq (at least on Cygwin) is "file".

--Mike



Mike, I'll update 'prereq' to check for 'file' - it seems I don't need to bother 
with 'flex' but I might as well do it 'file'. I have tried to put a helpful 
message in 'prereq' to indicate how to get things that are missing. Can you give 
any suggestions for wording for Cygwin?


I'd suggest wording that is unlikely to be inaccurate next time Cygwin is 
updated.

I'm really quite surprised Cygwin lacks such a basic command. Does 'ls' come as 
standard, or do you need to install that too?


Dave

--
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 11:59 AM, Willem Jan Palenstijn wrote:

On Sun, Jun 06, 2010 at 11:51:43AM +0100, Dr. David Kirkby wrote:

On 06/ 6/10 11:27 AM, Willem Jan Palenstijn wrote:

The way this usually works is that packages are shipped with the output of
flex, so that flex doesn't have to be run again if the user doesn't have it.

In this case that also seems to be the case, since the singular package
includes src/Singular/libparse.cc. However, it's one second older than
libparse.l. A 'touch src/Singular/libparse.cc' in the spkg-install should work
around this, I think.

-Willem Jan



Thanks, I'll give that a try.

I can't understand in that case how Singular can possibly install on any
operating system which does not have 'flex' installed. But Mike is saying
Singular builds OK on Cygwin, despite the fact flex is not installed. How
can that be?

I'm using an old version of GNU make (3.80, dated 2002). Perhaps more
recent versions ignore very small time differences. I could see this
could be dangerous, but I'm also aware that if systems are not properly
synced in time, and use shared file systems, files can appear to have a
date in the future. It may be that certain versions of make take this
into account, and ignore small differences. This does not seem a very
plausible explanation, but I can't think of a better one!


Yeah, I was thinking the same thing. FAT32 only has a timestamp resolution of 2
seconds IIRC, so if the files are on FAT32, that might also be the reason. Or
possibly make on cygwin has a greater time tolerance because of this FAT32
property, even when running on other filesystems.

-Willem Jan




Thanks. You seem to have solved that. I made the change you suggested, and it 
works fine. I also sorted out a couple of other less major issues.


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

If anyone could review it, that would be great. I've put you as an author too, 
as that seems most appropriate, though I guess that means you can't review it 
unfortunately.




Dave

--
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] Doctest hang in very strange way.

2010-06-06 Thread Dr. David Kirkby
I've build Sage 4.4.3 on a Sun Blade 1000 but when running the long doctests, 
the output appears to hang. But the actual doctest command is not shown properly.


First the output of 'make ptestlong' showed this:


sage -t  -long devel/sage/sage/modular/abvar/lseries.py
 [10.2 s]
sage -t  -long devel/sage/sage/modular/abvar/homspace.py
 [171.9 s]
sage -t  -long devel/s

then on another occasion it stalled at the same place.

sage -t  -long devel/sage/sage/modular/abvar/lseries.py
 [10.2 s]
sage -t  -long devel/sage/sage/modular/abvar/homspace.py
 [171.8 s]
sage -t  -long devel/sa


I wondered if this could be a lack of memory (the machine only has 2 GB), but 
there are no messages about a lack of memory, vmstat shows a low scan rate (sr)


drkir...@redstart:~$ vmstat 10
 kthr  memorypagedisk  faults  cpu
 r b w   swap  free  re  mf pi po fr de sr s6 sd -- --   in   sy   cs us sy id
 0 0 0 9845200 1634144 306 1476 16 78 77 0 1 0 9  0  0  255 2852  214 46  6 49
 0 0 0 9675816 1384296 80 1136 0 3 3  0  0  0  0  0  0  302 7307  174 92  8  0
 0 0 0 9679088 1385816 84 1187 0 0 0  0  0  0 25  0  0  334 8152  204 92  8  0
 0 0 0 9671840 1380712 77 1121 0 1 1  0  0  0  0  0  0  301 7284  176 92  7  0
 0 0 0 9614728 1373816 71 695 0 0  0  0  0  0  0  0  0  287 5485  170 93  6  0
 0 0 0 9675328 1383760 78 1187 0 3 3  0  0  0  7  0  0  301 7694  175 92  8  0
 0 0 0 9637248 1352144 15 365 0 0  0  0  0  0 17  0  0  325 1461  191 98  2  0
 0 0 0 9634304 1348968 0  4  0  0  0  0  0  0  0  0  0  301  207  171 99  1  0

and 'prstat' does not show excessive memory usage by anything.

   PID USERNAME  SIZE   RSS STATE  PRI NICE  TIME  CPU PROCESS/NLWP
 20550 drkirkby  209M  137M run 200   0:26:09  49% python/1
 20797 drkirkby  168M   97M cpu0100   0:06:34  50% python/1
 15601 drkirkby 9528K 7896K sleep   590   0:00:08 0.0% python/3
 20795 drkirkby 8704K 6352K sleep   590   0:00:00 0.0% python/1
 20548 drkirkby 8664K 6312K sleep   590   0:00:01 0.0% python/1
 19006 drkirkby 6728K 5160K sleep   590   0:00:00 0.0% python/1
 20716 root 8416K 4816K sleep   590   0:00:00 0.0% sshd/1
 20377 root 8408K 4352K sleep   590   0:00:00 0.0% sshd/1
 15602 drkirkby 9072K 4120K sleep   590   0:00:01 0.0% python/1
 15603 drkirkby 9072K 4120K sleep   590   0:00:01 0.0% python/1
 20869 drkirkby 4496K 4104K cpu1390   0:00:00 0.1% prstat/1
   499 root 9192K 3424K sleep   590   0:00:02 0.0% snmpd/1
88 root 4320K 2984K sleep   590   0:00:11 0.0% nscd/26
   306 root 5344K 2920K sleep   590   0:00:03 0.0% fmd/12
 20723 drkirkby 8192K 2736K sleep   590   0:00:00 0.0% sshd/1
Total: 59 processes, 164 lwps, load averages: 2.01, 2.01, 2.03


Has anyone got any ideas?

Dave

--
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: Release management best practices and tools

2010-06-06 Thread Minh Nguyen
Hi Jason,

On Sun, Jun 6, 2010 at 12:42 AM, Jason Grout
 wrote:



> Wow, that ticket is closed as fixed, only an 1.5 hours after you submitted
> it!

Yes, that was quick. And Sage 4.4.3 builds at least on these machines
on the GCC Compile Farm:

* gcc11: Debian GNU/Linux 5.0, Dual-Core AMD Opteron(tm) Processor
2212 @ 2000.085 MHz, GCC 4.3.2, doctest pass.

* gcc16: Debian GNU/Linux 5.0, Quad-Core AMD Opteron(tm) Processor
8354 @ 2194.496 MHz, GCC 4.3.2, two failures in
devel/sage/sage/schemes/elliptic_curves/lseries_ell.py

* gcc100: Debian GNU/Linux 5.0, AMD Opteron(tm) Processor 252 @
2600.011 MHz, GCC 4.3.2, three failures in
devel/sage/sage/modules/free_module.py

-- 
Regards
Minh Van Nguyen

-- 
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] File ownership

2010-06-06 Thread Jan Groenewald
Hi

On Sun, Jun 06, 2010 at 12:47:01PM +0100, John Cremona wrote:
> What I do is this:
> 
> (1) unpack and build in my own directory
> (2) using sudo, copy everything to /usr/local/sage/sage-x.y.z
> (3) using sudo, run /usr/local/sage/sage-x.y.z/sage once
> (4) using sudo, do chown -R root:root /usr/local/sage/ and also chmod
> -R a+rX /usr/local/sage
> Note the capital X in the last command, which has the effect of giving
> everyone x permission iff the owner has it.

Great. That confirms pretty much my approach.

Is that all necessary? sufficient? best-practice?
(So far the +X permissions have not been necessary 
for me, since about version 3.x.y till now. So the
files already built with this correct permissions.)
It seems best practice to me.

What about the case of build leaving files with too 
many permissions?

Most package-building tools (dpkg, emerge, rpm, etc.) would
do this permission change when? During dpkg-build?

In addition:
Long ago I had to make /usr/local/src/sage-4.4.3/tmp/tmp
and give it permissions 1777 (like /tmp) for users wishing
to run sage -t on this system-wide install, and who was
denied permission. This user has not been back, so I have
not run into it again. It might still be necessary,
when SAGE_TESTDIR is not set (and the user might use
sage -t before knowing what SAGE_TESTDIR is).



Also I want to script this build process, including
some local optional pacakges, and even an hg clone
and patch and sage -b clone, and rerun this on many
laptops for users who come to me. The user is usually
uid 1000, but it is more tricky to run the first
parts as that user, when I this is part of a larger
script already running as root to aptitude install
and customize a bunch of non-sage-related things.
I uistall and partition the image, next to or in or 
over windows, and run my script as root and hand it
over to them after many things including sage
is installed. So far just building as root has been easier
than guessing the uid and su-ing to that id to build
before coming back to root to copy the files in place.


regards,
Jan
-- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 

-- 
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] File ownership

2010-06-06 Thread Jan Groenewald
Hi

On Sun, Jun 06, 2010 at 01:45:00PM +0200, Jan Groenewald wrote:
> >> When I untar sage as root not all files are owned
> >> as root. (This is after running make as root, but still)
> My query is about the file ownerships and still stands please.

Let me expand.

Unlike other packages, sage does not have 'make install', or
a prepared package for any distro. It copies only a sage script
pointing at the files. 

In making headway towards system-wide installs, the files
used, the untarred and built system, should be capable of
being owned by root.

I'm exploring the question from that angle.

Of course some don't-build-as-root and sudo
questions will arise, but the focus here
is on a system-wide install, not the practice
of individual users, who Ñ•hould of course

./configure
make
sudo make install 

in general, and for sage, preferably
untar or build as themselves, then sudo cp sage and
edit SAGE_ROOT.

Please leave those aside for now, and look at the
question of file ownership for a system-wide install.

Usually, the sudo make install step would change ownership
to be root. In sage's case, this affects only the sage
script. I feel having many sage files in the untarred/build
directories having unpredictable ownerships, potentially
groups with certain elevated permissions on all the systems out
there (by user/group id) is 1) inelegant and 2) dangerous.

regards,
Jan


-- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 

-- 
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] File ownership

2010-06-06 Thread John Cremona
What I do is this:

(1) unpack and build in my own directory
(2) using sudo, copy everything to /usr/local/sage/sage-x.y.z
(3) using sudo, run /usr/local/sage/sage-x.y.z/sage once
(4) using sudo, do chown -R root:root /usr/local/sage/ and also chmod
-R a+rX /usr/local/sage

Note the capital X in the last command, which has the effect of giving
everyone x permission iff the owner has it.

John

On 6 June 2010 12:29, Dr. David Kirkby  wrote:
> On 06/ 6/10 12:11 PM, j...@aims.ac.za wrote:
>>
>> Hi
>>
>> When I untar sage as root not all files are owned
>> as root. (This is after running make as root, but still)
>
> It's unwise to use the root account for anything where it is not needed. The
> chance of you accidentally screwing up your system is much higher if you use
> the root account unnecessarily.
>
> It's much better to use su, sudo of pfexec to get root privileges when you
> actually need it, rather than use the privileged account unnecessarily.
>
> Dave
>
> --
> 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


Re: [sage-devel] File ownership

2010-06-06 Thread Jan Groenewald
HI

On Sun, Jun 06, 2010 at 12:29:37PM +0100, Dr. David Kirkby wrote:
> On 06/ 6/10 12:11 PM, j...@aims.ac.za wrote:
>> Hi
>>
>> When I untar sage as root not all files are owned
>> as root. (This is after running make as root, but still)
>
> It's unwise to use the root account for anything where it is not needed. 
> The chance of you accidentally screwing up your system is much higher if 
> you use the root account unnecessarily.

Yes, I am aware of that, thanks, and was not promoting it.

It is also best practice to install system-wide packages, as on
any modern linux distro, with the files owned by root.

> It's much better to use su, sudo of pfexec to get root privileges when 
> you actually need it, rather than use the privileged account 
> unnecessarily.

Yes, thanks, I know.

My query is about the file ownerships and still stands please.

regards,
Jan

-- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 

-- 
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] File ownership

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 12:11 PM, j...@aims.ac.za wrote:

Hi

When I untar sage as root not all files are owned
as root. (This is after running make as root, but still)


It's unwise to use the root account for anything where it is not needed. The 
chance of you accidentally screwing up your system is much higher if you use the 
root account unnecessarily.


It's much better to use su, sudo of pfexec to get root privileges when you 
actually need it, rather than use the privileged account unnecessarily.


Dave

--
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] File ownership

2010-06-06 Thread Jan Groenewald
Hi

On Sun, Jun 06, 2010 at 01:11:47PM +0200, j...@aims.ac.za wrote:
> I used to do chmod a+R /usr/local/src/sage*

correction chmod a+r -R

Jan


-- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 

-- 
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] File ownership

2010-06-06 Thread jan
Hi

When I untar sage as root not all files are owned
as root. (This is after running make as root, but still)

0 r...@muizenberg:/usr/local/src/sage-4.4.3#ls -ln
total 30672
-rw-r--r--  1 1000 100071842 2010-06-06 07:43 COPYING.txt
drwxr-xr-x  800 4096 2010-06-06 09:26 data
drwxr-xr-x  400 4096 2010-06-06 08:51 devel
-rw-r--r--  100   107841 2010-06-06 09:49 dochtml.log
drwxr-xr-x 1500 4096 2010-06-06 09:12 examples
-rw-r--r--  100 31120837 2010-06-06 09:26 install.log
drwxr-xr-x  200 4096 2010-06-06 07:43 ipython
drwxr-xr-x 1200 4096 2010-06-06 09:16 local
-rw-r--r--  1 1000 1000 3032 2010-05-13 09:42 makefile
-rw-r--r--  1 1000 100010662 2010-06-06 07:43 README.txt
-rwxr-xr-x  1 1000 1000 1449 2010-02-11 18:56 sage
-rwxr-xr-x  100   38 2010-06-06 07:43 sage-python
-rw-r--r--  1 1000 1000 1622 2010-06-06 07:43 sage-README-osx.txt
drwxr-xr-x  6 1000 1000 4096 2010-06-06 07:43 spkg
drwxr-xr-x  200 4096 2010-06-06 07:43 tmp

I usually do

chown -R root.root /usr/local/src/sage*

but for system-wide installs is it not better that all
files be owned by root? Does this have to be taken care
of before the tarball is made? 

2.

I used to do chmod a+R /usr/local/src/sage*
to make sure all files are readable once they are owned by root.
What is best practice here?

0 r...@muizenberg:/usr/local/src/sage-4.4.3#find . -type f ! -perm 644 -a ! 
-perm 664 -a ! -perm 755 -a ! -perm 775 |wc -l
440
0 r...@muizenberg:/usr/local/src/sage-4.4.3#find . -type f ! -perm 644 -a ! 
-perm 664 -a ! -perm 755 -a ! -perm 775 -a ! -perm 640|wc -l
8
0 r...@muizenberg:/usr/local/src/sage-4.4.3#find . -type f ! -perm 644 -a ! 
-perm 664 -a ! -perm 755 -a ! -perm 775 -a ! -perm 640 -exec ls -l '{}' \;
-rwxr--r-- 1 root root 129 2010-06-06 08:02 ./local/bin/which_fortran
-rwxr-x--- 1 root root 1885 2010-06-06 09:13 
./local/lib/gap-4.4.12/terminfo/r/rxvt
-rwxr-x--- 1 root root 1533 2010-06-06 09:13 
./local/lib/gap-4.4.12/terminfo/c/cygwin
-rwxr-x--- 1 root root 2100 2010-06-06 09:13 
./local/lib/gap-4.4.12/terminfo/x/xterm
-r-xr-xr-x 1 root root 5547024 2010-06-06 07:49 ./local/lib/libpython2.6.so.1.0
-rw--- 1 root root 16384 2010-06-06 09:17 
./local/include/lcalc/Lexplicit_formula.h.swap.crap
-rw--- 1 root root 4251 2010-06-06 09:17 ./local/include/lcalc/Ldokchitser.h
-rw--- 1 root root 1604 2010-06-06 09:20 
./local/share/moin/data/plugin/parser/jsmath.py
0 r...@muizenberg:/usr/local/src/sage-4.4.3#

regards,
Jan

-- 
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Willem Jan Palenstijn
On Sun, Jun 06, 2010 at 11:51:43AM +0100, Dr. David Kirkby wrote:
> On 06/ 6/10 11:27 AM, Willem Jan Palenstijn wrote:
>> The way this usually works is that packages are shipped with the output of
>> flex, so that flex doesn't have to be run again if the user doesn't have it.
>>
>> In this case that also seems to be the case, since the singular package
>> includes src/Singular/libparse.cc. However, it's one second older than
>> libparse.l. A 'touch src/Singular/libparse.cc' in the spkg-install should 
>> work
>> around this, I think.
>>
>> -Willem Jan
>>
>
> Thanks, I'll give that a try.
>
> I can't understand in that case how Singular can possibly install on any  
> operating system which does not have 'flex' installed. But Mike is saying 
> Singular builds OK on Cygwin, despite the fact flex is not installed. How 
> can that be?
>
> I'm using an old version of GNU make (3.80, dated 2002). Perhaps more 
> recent versions ignore very small time differences. I could see this 
> could be dangerous, but I'm also aware that if systems are not properly 
> synced in time, and use shared file systems, files can appear to have a 
> date in the future. It may be that certain versions of make take this 
> into account, and ignore small differences. This does not seem a very 
> plausible explanation, but I can't think of a better one!

Yeah, I was thinking the same thing. FAT32 only has a timestamp resolution of 2
seconds IIRC, so if the files are on FAT32, that might also be the reason. Or
possibly make on cygwin has a greater time tolerance because of this FAT32
property, even when running on other filesystems.

-Willem Jan

-- 
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 11:27 AM, Willem Jan Palenstijn wrote:

On Sun, Jun 06, 2010 at 09:14:09AM +0100, Dr. David Kirkby wrote:

I've tried twice to build Sage on a machine in which 'flex' was not in
the path. It has both times failed with:

make install in Singular
make[4]: Entering directory
`/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'
sh flexer.sh -I -Pyylp -t libparse.l>libparse.cc.lmp
flexer.sh: flex: not found
flexer.sh: test: argument expected
make[4]: *** [libparse.cc] Error 1


So is flex a requirement to build Sage? If it is, then I'll add to the
'prereq' script a test for flex. If, which I doubt, it is only needed on
Solaris, then I'll make the test specific to Solaris.


The way this usually works is that packages are shipped with the output of
flex, so that flex doesn't have to be run again if the user doesn't have it.

In this case that also seems to be the case, since the singular package
includes src/Singular/libparse.cc. However, it's one second older than
libparse.l. A 'touch src/Singular/libparse.cc' in the spkg-install should work
around this, I think.

-Willem Jan



Thanks, I'll give that a try.

I can't understand in that case how Singular can possibly install on any 
operating system which does not have 'flex' installed. But Mike is saying 
Singular builds OK on Cygwin, despite the fact flex is not installed. How can 
that be?


I'm using an old version of GNU make (3.80, dated 2002). Perhaps more recent 
versions ignore very small time differences. I could see this could be 
dangerous, but I'm also aware that if systems are not properly synced in time, 
and use shared file systems, files can appear to have a date in the future. It 
may be that certain versions of make take this into account, and ignore small 
differences. This does not seem a very plausible explanation, but I can't think 
of a better one!


Dave

--
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 after sage -upgrade from 4.4.2 to 4.4.3

2010-06-06 Thread François Bissey
> On 06/ 6/10 10:53 AM, François Bissey wrote:
> >>> You could also try
> >>> 
> >>> sage -ba
> >>> 
> >>> which will rebuild from scratch all Cython code.
> >> 
> >> OK I will give it a go.
> > 
> > No improvement. I am considering this upgrade officially failed
> > on my machine.
> > 
> > Francois
> 
> Can anyone tell me what happens in a 'sage -upgrade'? I'm puzzled why this
> can't be made to work. I would have thought as a minimum one would need to
> 
> 1) Rebuild any new standard packages.
> 2) Rebuild any standard package which depends on another package which has
> been upgraded.
> 3) Rebuild the library.
> 
> Is '(2)' being done? If not, I suspect it would be more reliable.
I would think it is done that way. Although sometimes there are difficulties.
It's possible that I didn't actually found the right culprit in this case.
pynac only depends on python so there's not much to rebuild. 
The list of updated package is very short so this is puzzling but bugs
in upgrading system happen. Possibly in this case something went subtly
wrong from 4.4.1->4.4.2->4.4.3

Note that 1) is actually divided into two parts:
1) Rebuild any new standard packages that sage depends on.

4) rebuild any new standard package that is a runtime dependency.
in this case scipy* was rebuilt last.

>From my work in sage-on-gentoo I don't think the separation between 
1 and 4 is accurate in sage, but nothing that should be in 1 is in 4 so that's 
OK. 

Francois

-- 
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 after sage -upgrade from 4.4.2 to 4.4.3

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 10:53 AM, François Bissey wrote:

You could also try


sage -ba


which will rebuild from scratch all Cython code.


OK I will give it a go.


No improvement. I am considering this upgrade officially failed
on my machine.

Francois




Can anyone tell me what happens in a 'sage -upgrade'? I'm puzzled why this can't 
be made to work. I would have thought as a minimum one would need to


1) Rebuild any new standard packages.
2) Rebuild any standard package which depends on another package which has been 
upgraded.

3) Rebuild the library.

Is '(2)' being done? If not, I suspect it would be more reliable.

--
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Willem Jan Palenstijn
On Sun, Jun 06, 2010 at 09:14:09AM +0100, Dr. David Kirkby wrote:
> I've tried twice to build Sage on a machine in which 'flex' was not in 
> the path. It has both times failed with:
>
> make install in Singular
> make[4]: Entering directory  
> `/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'
> sh flexer.sh -I -Pyylp -t libparse.l >libparse.cc.lmp
> flexer.sh: flex: not found
> flexer.sh: test: argument expected
> make[4]: *** [libparse.cc] Error 1
>
>
> So is flex a requirement to build Sage? If it is, then I'll add to the 
> 'prereq' script a test for flex. If, which I doubt, it is only needed on 
> Solaris, then I'll make the test specific to Solaris.

The way this usually works is that packages are shipped with the output of
flex, so that flex doesn't have to be run again if the user doesn't have it.

In this case that also seems to be the case, since the singular package
includes src/Singular/libparse.cc. However, it's one second older than
libparse.l. A 'touch src/Singular/libparse.cc' in the spkg-install should work
around this, I think.

-Willem Jan

-- 
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 after sage -upgrade from 4.4.2 to 4.4.3

2010-06-06 Thread François Bissey
> > You could also try
> >
> > 
> >sage -ba
> > 
> >
> > which will rebuild from scratch all Cython code.
> 
> OK I will give it a go.

No improvement. I am considering this upgrade officially failed
on my machine.

Francois

-- 
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 09:18 AM, Mike Hansen wrote:

On Sun, Jun 6, 2010 at 1:14 AM, Dr. David Kirkby
  wrote:

So is flex a requirement to build Sage? If it is, then I'll add to the
'prereq' script a test for flex. If, which I doubt, it is only needed on
Solaris, then I'll make the test specific to Solaris.


For what it's worth, Sage / Singular builds on Cygwin where "flex"
does not seem to be installed.


Thanks mike.


Another thing which needs to be added to prereq (at least on Cygwin) is "file".

--Mike



I'm really surprised that 'file' does not exist on Cygwin. It is required as 
part of POSIX


http://www.opengroup.org/onlinepubs/9699919799/utilities/file.html

and IMHO is a pretty common and useful command. Something like 'lex' and 'yacc' 
I can see are less useful to most people, but I would have thought having 'file' 
installed was almost as useful as 'ls'!


dave

--
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby

On 06/ 6/10 09:45 AM, William Stein wrote:

On Sun, Jun 6, 2010 at 1:14 AM, Dr. David Kirkby
  wrote:

I've tried twice to build Sage on a machine in which 'flex' was not in the
path. It has both times failed with:

make install in Singular
make[4]: Entering directory
`/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'
sh flexer.sh -I -Pyylp -t libparse.l>libparse.cc.lmp
flexer.sh: flex: not found
flexer.sh: test: argument expected
make[4]: *** [libparse.cc] Error 1


So is flex a requirement to build Sage? If it is, then I'll add to the
'prereq' script a test for flex. If, which I doubt, it is only needed on
Solaris, then I'll make the test specific to Solaris.

The Solaris system has 'lex' in the path, and whilst 'flex' comes as part of
Solaris, it is in a directory (/usr/sfw/bin) which was not in the path on
this particular attempt at building.

I want to avoid forcing everyone to have flex installed if it is possible to
build Sage without flex, though I doubt that is the case.


Flex and bison used to be required to build Sage.  But they definitely haven't
been required for years on Linux, etc.   I'm not sure what's going on
with Solaris.

William


Interesting.

Certainly adding /usr/sfw/bin to the path, where 'flex' is, results in a 
successful build of Singular


drkir...@swan:~/32/sage-4.4.3$ ls spkg/installed/sin*
spkg/installed/singular-3-1-0-4-20100214
drkir...@swan:~/32/sage-4.4.3$

singular-3-1-0-4-20100214/src/Singular/flexer.sh

is the file which calls 'flex;.

In Singular's 'configure.in' I see some checks around 'lex' and 'flex'. It may 
be that it will build without 'lex', but fails to build with 'lex'. (Remember, 
flex is a GNU replacement for 'lex'). On Solaris 'lex' was in my path, but not 
'flex'.


There's also a check for bison.

# bison
AC_CHECK_PROGS(BISON, bison)
if test "${BISON+set}" != set; then
  AC_MSG_WARN(did not find bison -- make might fail)
fi

So it is perhaps not wise to build without bison.

I note from the comment on sage-support about the package 'LiE' that bison is 
required to install that.


Do these two checks make sense to add to 'prereq'?

1) 'file' - on all platforms. That is currently used in 'prereq' anyway.

I'm surprised Cygwin does not come with the 'file' command, since it's a POSIX 
requirement. It's also an amazingly useful command.


2) 'flex' - only check for that on Solaris.

Dave

--
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: new paper on sage by myself and Burcin Erocal

2010-06-06 Thread Sazzad
>
> there will be no new accounts on sagenb.org :-(
>

so i was lucky enough to create an account few days back? voila!

apparently sagenb doesn't have any link to offer new account creation

-- 
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] Is 'flex' needed to build Sage?

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 1:14 AM, Dr. David Kirkby
 wrote:
> I've tried twice to build Sage on a machine in which 'flex' was not in the
> path. It has both times failed with:
>
> make install in Singular
> make[4]: Entering directory
> `/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'
> sh flexer.sh -I -Pyylp -t libparse.l >libparse.cc.lmp
> flexer.sh: flex: not found
> flexer.sh: test: argument expected
> make[4]: *** [libparse.cc] Error 1
>
>
> So is flex a requirement to build Sage? If it is, then I'll add to the
> 'prereq' script a test for flex. If, which I doubt, it is only needed on
> Solaris, then I'll make the test specific to Solaris.
>
> The Solaris system has 'lex' in the path, and whilst 'flex' comes as part of
> Solaris, it is in a directory (/usr/sfw/bin) which was not in the path on
> this particular attempt at building.
>
> I want to avoid forcing everyone to have flex installed if it is possible to
> build Sage without flex, though I doubt that is the case.

Flex and bison used to be required to build Sage.  But they definitely haven't
been required for years on Linux, etc.   I'm not sure what's going on
with Solaris.

William

>
> Dave
>
> --
> 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
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Re: new paper on sage by myself and Burcin Erocal

2010-06-06 Thread William Stein
On Sun, Jun 6, 2010 at 12:45 AM, Jason B Hill  wrote:
>
>> >
>> > sudo apt-get maxima
>
> It should be
>
> sudo apt-get install maxima
>
> and as Mike pointed out, that requires admin access. A *.deb file like what
> you found is an installer for Debian based systems (such as Ubuntu), also
> requiring admin access.
>
> You could always create a Sage notebook account (sagenb.org) and use the
> "maxima.eval" route... e.g.,

Actually, make the account on http://demo.sagenb.org.

The Sage notebook http://sagenb.org just passed about 32000 accounts,
and I  store the notebook user directories in a single directory on an
ext3 filesystem, which has a limit of that many directories!
So until the notebook gets rewritten to not store all home in one
directory, or until the notebook gets moved to a new directory, there
will be no new accounts on sagenb.org :-(.

 -- William

>
> maxima.eval('integrate(tan(x),x)')
>
>
> 15 cupholders could hold a lot of free beer. (* I'm thinking of the
> non-automotive, lawn/campchair variety.)
>
> 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
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Is 'flex' needed to build Sage?

2010-06-06 Thread Mike Hansen
On Sun, Jun 6, 2010 at 1:14 AM, Dr. David Kirkby
 wrote:
> So is flex a requirement to build Sage? If it is, then I'll add to the
> 'prereq' script a test for flex. If, which I doubt, it is only needed on
> Solaris, then I'll make the test specific to Solaris.

For what it's worth, Sage / Singular builds on Cygwin where "flex"
does not seem to be installed.

Another thing which needs to be added to prereq (at least on Cygwin) is "file".

--Mike

-- 
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] Is 'flex' needed to build Sage?

2010-06-06 Thread Dr. David Kirkby
I've tried twice to build Sage on a machine in which 'flex' was not in the path. 
It has both times failed with:


make install in Singular
make[4]: Entering directory 
`/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'

sh flexer.sh -I -Pyylp -t libparse.l >libparse.cc.lmp
flexer.sh: flex: not found
flexer.sh: test: argument expected
make[4]: *** [libparse.cc] Error 1


So is flex a requirement to build Sage? If it is, then I'll add to the 'prereq' 
script a test for flex. If, which I doubt, it is only needed on Solaris, then 
I'll make the test specific to Solaris.


The Solaris system has 'lex' in the path, and whilst 'flex' comes as part of 
Solaris, it is in a directory (/usr/sfw/bin) which was not in the path on this 
particular attempt at building.


I want to avoid forcing everyone to have flex installed if it is possible to 
build Sage without flex, though I doubt that is the case.


Dave

--
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: new paper on sage by myself and Burcin Erocal

2010-06-06 Thread Jason B Hill
> >
> > sudo apt-get maxima
>

It should be

sudo apt-get install maxima

and as Mike pointed out, that requires admin access. A *.deb file like what
you found is an installer for Debian based systems (such as Ubuntu), also
requiring admin access.

You could always create a Sage notebook account (sagenb.org) and use the
"maxima.eval" route... e.g.,

maxima.eval('integrate(tan(x),x)')


15 cupholders could hold a lot of free beer. (* I'm thinking of the
non-automotive, lawn/campchair variety.)

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