[sage-support] Re: error running make test on sage 5.4 on Lubuntu 12.10

2012-11-23 Thread Kjetil brinchmann Halvorsen
just to say that exactly the same error occurred con the new sage 5.4.1

kjetil

On Wed, Nov 14, 2012 at 8:41 AM, Kjetil brinchmann Halvorsen
 wrote:
> Hola!
>
> This is Lubuntu 12.10, with all updates, on an HP Pavillion dv4-51621a
> (with intel  core i5, if that matter)
>
> make   runs without problems. then:
>
>
> kjetil@kjetil-HP-Pavilion-dv4-Notebook-PC:~/sage/sage-5.4$ ./sage -t
> "devel/sage/sage/schemes/elliptic_curves/ell_number_field.py"
> sage -t  "devel/sage/sage/schemes/elliptic_curves/ell_number_field.py"
>
>
> **
> File 
> "/home/kjetil/sage/sage-5.4/devel/sage/sage/schemes/elliptic_curves/ell_number_field.py",
> line 277:
> sage: E.simon_two_descent()
> Expected:
> Traceback (most recent call last):
> ...
> RuntimeError:
>   ***   at top-level: ans=bnfellrank(K,[0,0,1,
>   *** ^
>   ***   in function bnfellrank: ...eqtheta,rnfeq,bbnf];rang=
>   ***   bnfell2descent_gen(b
>   ***   ^
>   ***   in function bnfell2descent_gen: ...riv,r=nfsqrt(nf,norm(zc))
>   ***   [1];if(DEBUGLEVEL_el
>   ***   ^
>   ***   array index (1) out of allowed range [none].
> An error occurred while running Simon's 2-descent program
> Got:
> Traceback (most recent call last):
>   File "/home/kjetil/sage/sage-5.4/local/bin/ncadoctest.py", line
> 1231, in run_one_test
> self.run_one_example(test, example, filename, compileflags)
>   File "/home/kjetil/sage/sage-5.4/local/bin/sagedoctest.py", line
> 38, in run_one_example
> OrigDocTestRunner.run_one_example(self, test, example,
> filename, compileflags)
>   File "/home/kjetil/sage/sage-5.4/local/bin/ncadoctest.py", line
> 1172, in run_one_example
> compileflags, 1) in test.globs
>   File "", line 1, in 
> E.simon_two_descent()###line 277:
> sage: E.simon_two_descent()
>   File 
> "/home/kjetil/sage/sage-5.4/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_number_field.py",
> line 305, in simon_two_descent
> maxprob=maxprob, limbigprime=limbigprime)
>   File 
> "/home/kjetil/sage/sage-5.4/local/lib/python/site-packages/sage/schemes/elliptic_curves/gp_simon.py",
> line 102, in simon_two_descent
> raise RuntimeError, "\n%s\nAn error occurred while running
> Simon's 2-descent program"%s
> RuntimeError:
>   ***   at top-level: ans=bnfellrank(K,[0,0,1,
>   *** ^
>   ***   in function bnfellrank:
> ...eqtheta,rnfeq,bbnf];rang=bnfell2descent_gen(b
>   ***
> ^
>   ***   in function bnfell2descent_gen:
> ...riv,r=nfsqrt(nf,norm(zc))[1];if(DEBUGLEVEL_el
>   ***
>  ^
>   ***   array index (1) out of allowed range [none].
> An error occurred while running Simon's 2-descent program
> **
> 1 items had failures:
>1 of  18 in __main__.example_3
> ***Test Failed*** 1 failures.
> For whitespace errors, see the file
> /home/kjetil/.sage//tmp/ell_number_field_26399.py
>  [41.3 s]
>
> --
> The following tests failed:
>
>
> sage -t  "devel/sage/sage/schemes/elliptic_curves/ell_number_field.py"
> Total time for all tests: 41.4 seconds
> kjetil@kjetil-HP-Pavilion-dv4-Notebook-PC:~/sage/sage-5.4$
> kjetil@kjetil-HP-Pavilion-dv4-Notebook-PC:~/sage/sage-5.4$
> kjetil@kjetil-HP-Pavilion-dv4-Notebook-PC:~/sage/sage-5.4$
>
> Kjetil
>
>
> --
> "If you want a picture of the future - imagine a boot stamping on the
> human face - forever."
>
> George Orwell (1984)



-- 
"If you want a picture of the future - imagine a boot stamping on the
human face - forever."

George Orwell (1984)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Serious bug in Graph.modular_decomposition (which propagates to Graph.is_prime)

2012-11-23 Thread Nathann Cohen
The ticket is now waiting to be reviewed :-)

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

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] prebuild sage v5.4.1, linux 32-bit: twistd get wrong pidfile name when starting notebook(dir=..)

2012-11-23 Thread Andre, der Besonnene
I'm trying to update to sage 5.4.1. When I start a notebook without a directory 
parameter, everything goes fine. But if I want to start a notebook with:

sage: notebook(directory="/home/sage/s/",interface='')

I get an error message. 


Executing twistd  --pidfile="s/sagenb.pid" -ny "s.sagenb/twistedconf.tac"
 /\/\/\/\/\/\
.
2012-11-23 21:31:23+0100 [-]   File 
"/opt/sage/sage-5.4.1-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/scripts/_twistd_unix.py",
 line 293, in setupEnvironment
2012-11-23 21:31:23+0100 [-] f = open(pidfile,'wb')
2012-11-23 21:31:23+0100 [-] IOError: [Errno 2] No such file or directory: 
'/home/sage/s/sagenb.pid'
.   
/\/\/\/\/\

There is indeed no file /./../s/sagenb.pid, because sage creates a directory 
/./../s.sagenb/ .

greetings/Liebe Grüße aus dem nebeligen Seewinkel
Andre

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] sage v5.4.1 linux 32bit, twistd error when starting notebook(dir=..)

2012-11-23 Thread Andre, der Besonnene
 When I start a notebook without giving a directory parameter everything 
works fine. But when I try to add a directory parameter sage refuses to 
start a webinterface server:

sage: notebook(directory="/home/sage/s",interface='')  
..
Executing twistd  --pidfile="s/sagenb.pid" -ny "s.sagenb/twistedconf.tac"
 /\/\/\/\/\/\
2012-11-23 21:31:23+0100 [-]   File 
"/opt/sage/sage-5.4.1-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/scripts/_twistd_unix.py",
 
line 293, in setupEnvironment
2012-11-23 21:31:23+0100 [-] f = open(pidfile,'wb')
2012-11-23 21:31:23+0100 [-] IOError: [Errno 2] No such file or directory: 
'/home/sage/s/sagenb.pid'
..

I guess the pidfile should be 
/home/sage/s.sagenb/sagenb.pid, 
  /\/\/\/\/\/\/\/\/\/\

Liebe Grüße aus einen nebeligen Seewinkel, regards
Andre

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Showing a scalar outside a matrix

2012-11-23 Thread P Purkayastha

On 11/23/2012 10:53 PM, Myriam Mahaman wrote:

Show(1/2*A) multiplies out the scalar and the matrix, but I want to show the 
1/2 outside the matrix A. How can I do this?



As far as I know, you can't.

One hack: pretty_print(1/2, A)

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Serious bug in Graph.modular_decomposition (which propagates to Graph.is_prime)

2012-11-23 Thread Nathann Cohen
Hell !!

> Indeed it worked!

Good !

> Now I can report that the bug I have reported is solved.

Well.. It is solved on your (unique) version of Sage :-P

I haven't written the patch yet. I wait for an answer from the code's
author, and then it will be ready to be reviewed :-)

> Thank you very much Nathann!

Well, thank you for reporting the bug ! ;-)

Have fn !

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Serious bug in Graph.modular_decomposition (which propagates to Graph.is_prime)

2012-11-23 Thread Paulo Seijas
Hello Nathann,

Oh. Well, perhaps you need to do something like "touch 
> modular_decomposition.pyx" when you are in the 
> sage/graphs/modular_decomposition folder. Then run "sage -b". 
> modular_decomposition.pyx is the actual Sage code, that depends on the .c 
> file you modified. It should be enough. Tell me how it goes !! I will keep 
> this thread updated about the fix.
>
Indeed it worked!
I've just:
1) Replaced the the files: dm.c, dm_english.c and random.c from Fabien's 
tar to devel/sage-main/sage/graphs/modular_decomposition/src taking care of 
commenting the line "#include "dm_english.h" in dm.c.
2) "touch modular_decomposition.pyx"
3) "sage -b" (for this I had to install the g++ package)
Now I can report that the bug I have reported is solved. Look:

sage: P = Graph('Dl_')
sage: P.is_prime()
False
sage: P.complement().is_prime()  
False
sage: P.modular_decomposition()
('Prime', [2, 0, 4, ('Parallel', [1, 3])])
sage: P.complement().modular_decomposition()
('Prime', [('Serie', [3, 1]), 4, 0, 2])
sage: for g in graphs(7):
: if g.is_prime() and not g.complement().is_prime():
: g.graph6_string()
: 
sage: 

Thank you very much Nathann!
Paulo

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Showing a scalar outside a matrix

2012-11-23 Thread Myriam Mahaman
Show(1/2*A) multiplies out the scalar and the matrix, but I want to show the 
1/2 outside the matrix A. How can I do this?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Serious bug in Graph.modular_decomposition (which propagates to Graph.is_prime)

2012-11-23 Thread Nathann Cohen
Hello !!

> So, I downloaded the most current version of the source code from
> http://www.liafa.jussieu.fr/~fm/algos/dm.tar, compiled it and run the
exact
> same code codifying the graph P. This time I got the right answer:

H O_O

So either Fabien modified it since I wrote to him about the bug you
reported, or he updated it without me knowing since the last time... Well,
looks like we have an easy way out then ! I will just have to create a
patch that replaces the current file, and we'll be done ;-)

> Introducing some changes into the file dm.c by hand seem to be not enough
> to make sage recompile it and change the behaviour of the command
> "P.modular_decomposition()" afterwards. Could you please tell how could I
> sage know that it must recompile dm.c after I modify it?

Oh. Well, perhaps you need to do something like "touch
modular_decomposition.pyx" when you are in the
sage/graphs/modular_decomposition folder. Then run "sage -b".
modular_decomposition.pyx is the actual Sage code, that depends on the .c
file you modified. It should be enough. Tell me how it goes !! I will keep
this thread updated about the fix.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Serious bug in Graph.modular_decomposition (which propagates to Graph.is_prime)

2012-11-23 Thread Paulo Seijas
Hello Nathann,

You're absolutely right! The problem is due to 
sage/graph/modular_decomposition/src/dm.c. I've managed to compile it in C, 
coded the graph P and got:

 Premier 
  +--3
  +--1
  +--5
  +--2
  +--4

So, I downloaded the most current version of the source code from 
http://www.liafa.jussieu.fr/~fm/algos/dm.tar, compiled it and run the exact 
same code codifying the graph P. This time I got the right answer:

 Premier 
  +--2
  +--0
  +--4
  +-Parallele 
  |  +--1
  |  +--3

So, the bug seem to be fixed in the most current version from Fabien's 
webpage.

Introducing some changes into the file dm.c by hand seem to be not enough 
to make sage recompile it and change the behaviour of the command 
"P.modular_decomposition()" afterwards. Could you please tell how could I 
sage know that it must recompile dm.c after I modify it?

Best,
Paulo

On Thursday, November 22, 2012 12:04:56 PM UTC-3, Nathann Cohen wrote:
>
> Hello Paulo !
>
> You did, and thank you for that !
>
> The trouble is that the bug does not come from Sage, but rather from the 
> piece of code we call to solve the problem. In 
> sage/graph/modular_decomposition/src/ there is a dm.c file that contains 
> the "smart" code, and contains a line at the top of the file :
> #define DEBUG 0
>
> I set it to 1, so that the C code can tell us by itself what is actually 
> happening before Sage does anything, and I get as output on your instance 
> (translated from french) :
> Final Tree:
>  Prime
>   +--3
>   +--1
>   +--5
>   +--2
>   +--4
>
> Well.. It just means that I have to forward the bug you found to the 
> software's author :-)
>
> I just create a trac ticket about that :
> http://trac.sagemath.org/sage_trac/ticket/13744
>
> Nathann
>
> On Wednesday, November 21, 2012 4:07:46 PM UTC+1, Paulo Seijas wrote:
>>
>> Hi,
>>
>> I think I have found a serious bug on Graph.modular_decomposition. 
>> Clearly, a graph is prime if and only if its complement is so. Nevertheless:
>>
>> sage: P = Graph('Dl_')
>> sage: P.is_prime()
>> True
>> sage: P.complement().is_prime()
>> False
>>
>> This behaviour seems to derive from Graph.modular_decomposition. Look:
>>
>> sage: P.modular_decomposition()
>> ('Prime', [2, 0, 4, 1, 3])
>> sage: P.complement().modular_decomposition()
>> ('Prime', [('Serie', [3, 1]), 4, 0, 2])
>>
>> This is not the only example where you can observe this behavior. To 
>> generate easily many examples try, for instance:
>>
>> sage: for g in graphs(7):
>> : if g.is_prime() and not g.complement().is_prime(): 
>> : g.graph6_string()
>> : 
>> 'Fl_K?'
>> 'FlGK?'
>> 'FlSK?'
>> 'FnsK?'
>> 'Fl[K?'
>> 'FheL?'
>> 'FlUL?'
>> 'F|UL?'
>> 'Fl]L?'
>> 'FlsKG'
>> 'FlUKG'
>> 'FluKG'
>> 'FnV[G'
>> 'FlT[G'
>> 'F|tkG'
>> 'Fl]KG'
>> 'Fl[KW'
>> 'Fn|KG'
>> 'Fn|kG'
>> 'F|LLG'
>> 'FnnLG'
>> 'Flg[?'
>> 'F|g[?'
>> 'Fli[?'
>> 'Flg{?'
>> 'Fn{[?'
>> 'Fn}[?'
>> 'FzN{?'
>> 'F~H[?'
>>
>> Best regards,
>> Paulo
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: LDAP (or AD or...) again

2012-11-23 Thread P Purkayastha

On 11/23/2012 09:01 PM, Jori Mantysalo wrote:

On Thu, 22 Nov 2012, P Purkayastha wrote:

(On which list should we continue?)


Start from sage-5.4 or higher version and look at
https://github.com/sagemath/sagenb/blob/master/INSTALL.rst. Follow the
directions in that file from point 3 onwards. After you have sagenb
set up, get the branch of rmartinjak.
https://groups.google.com/d/msg/sage-notebook/Hh5owT8TCos/6f7BnN4ZKcgJ
Just use rmartinjak instead of jhpalmieri, and use the branch
rmartinjak/ldap instead of jhpalmieri/mathmode.


OK, now I got $SAGE_ROOT/devel/sagenb as symbolic link to sagenb-github.
But $SAGE_ROOT/sagenb/notebook/user_manager.py contains only one line
referring to ldap:

there are UserManager backends (such as LDAP) where we could have many
valid usernames, but

Still something wrong with this setup?



Yes, something is wrong. You are not on the ldap branch yet. Look at the 
patch to user_manager.py here:

https://github.com/sagemath/sagenb/pull/73/files

It has a lot more changes. What is the output of

$ cd $SAGE_ROOT/devel/sagenb
$ git branch -a

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: LDAP (or AD or...) again

2012-11-23 Thread Jori Mantysalo

On Thu, 22 Nov 2012, P Purkayastha wrote:

(On which list should we continue?)

Start from sage-5.4 or higher version and look at 
https://github.com/sagemath/sagenb/blob/master/INSTALL.rst. Follow the 
directions in that file from point 3 onwards. After you have sagenb set up, 
get the branch of rmartinjak.

https://groups.google.com/d/msg/sage-notebook/Hh5owT8TCos/6f7BnN4ZKcgJ
Just use rmartinjak instead of jhpalmieri, and use the branch rmartinjak/ldap 
instead of jhpalmieri/mathmode.


OK, now I got $SAGE_ROOT/devel/sagenb as symbolic link to sagenb-github. 
But $SAGE_ROOT/sagenb/notebook/user_manager.py contains only one line 
referring to ldap:


  there are UserManager backends (such as LDAP) where we could have many valid 
usernames, but

Still something wrong with this setup?

--
Jori Mäntysalo

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.