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

2015-05-02 Thread Nathann Cohen
Hello !

> Thank you very much. With your help I was able to compile the library from
> the "new" sources and it is working properly now, although just for me of
> course.

"Good" :-P

> I understand your disappointment because of not being able to solve
> the issue for everybody.
>
> I am willing to write to the author of the C code but I do not know what
> exactly to ask him to do. The main problem is that the code works right in
> some architectures (at least in ours and in the one of the author I guess).

Well... Probably that it would be cool if they could try to test and
debug it under Mac OS X (seems like it aways fails on this
architecture), for there are known bugs and that their code returns
wrong results on this platform. I don't exactly know how to make them
understand that this is important O_o

> So what is needed the most is active involvement from some other Sage user
> interested in having the modular_decomposition package to work in a
> different architecture so as detect what should be modified in the C code to
> make it work in that architecture too. Is there someone out there?

Someone with a mac. Someone who preferably knows french, as the all
comments are in french.

> I really appreciate your effort to make modular decomposition available in
> Sage because for some of us this is very useful. I think that keeping
> modular_decomposition as an optional package should be useful for testing
> purposes in different architectures until the portability problem with the
> source code is identified and solved.

I have to day that I am a bit pessimistic. The code has been in Sage's
source tree for years already :-/

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Sage find_root error

2015-05-02 Thread Paul Royik
Don't know why but find_root(x*tan(x), -1, 5) gives me 1.570796 which is 
incorrect, since it is pi/2, the value at which tangent doesn't exist.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


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

2015-05-02 Thread Paulo Seijas
Hi Nathann,

Thank you very much. With your help I was able to compile the library from 
the "new" sources and it is working properly now, although just for me of 
course. I understand your disappointment because of not being able to solve 
the issue for everybody.

I am willing to write to the author of the C code but I do not know what 
exactly to ask him to do. The main problem is that the code works right in 
some architectures (at least in ours and in the one of the author I guess). 
So what is needed the most is active involvement from some other Sage user 
interested in having the modular_decomposition package to work in a 
different architecture so as detect what should be modified in the C code 
to make it work in that architecture too. Is there someone out there?

I really appreciate your effort to make modular decomposition available in 
Sage because for some of us this is very useful. I think that keeping 
modular_decomposition as an optional package should be useful for testing 
purposes in different architectures until the portability problem with the 
source code is identified and solved.

Thanks,
Paulo

On Saturday, May 2, 2015 at 12:33:11 PM UTC-3, Nathann Cohen wrote:
>
> Hello ! 
>
> > I would like to know if there is any workaround for solving this issue 
> for 
> > version 6.6. Unfortunately, there is no dm.c and no random.c in the sage 
> 6.6 
> > directory structure so as to replace them and so I do not know how to 
> > proceed. 
>
> Sigh... Modular decomposition. A story of many disappointments. 
>
> No, right now you will not find those two files in Sage's source code. 
> They are, however, contained in the optional package that is 
> downloaded when you run "sage -i modular_decomposition", and all that 
> is done on them is compile them into a shared library named 
> libmodulardecomposition (if I remember correctly. Not of my own 
> computer at the moment) located in SAGE_ROOT/local/lib/. If you 
> compile this shared library from the new sources, there should not be 
> any problem. If you do not know how, open the archive and look at 
> "spkg-install", it contains the lines that do that. 
>
> I feel a bit guilty telling you how to make it work on your computer; 
> for we have a REAL problem with this package. What we need is to get 
> the original authors to solve it. 
>
> 1) The old version of the sources (those that we ship) returns wrong 
> results. For instance on yours, as you were the one who reported it 
> first. 
>
> 2) The new version of the sources apparently returns correct results 
> on your architecture (and on mine), but  not on all of them. Look 
> at this ticket I opened when you first reported it: 
> http://trac.sagemath.org/ticket/13744 
>
> As you can see, the "new" version still triggers segfaults or wrong 
> results on some machines that we use to test Sage. Thus, my attempts 
> at upgrading Sage's version of the code were (rather legitimately) 
> refused. 
>
> I am stuck with those files, and I do not like this situation (at 
> all). We ship something which returns wrong results, the problem is 
> fixed by updating to a new version which returns wrong results too or 
> even segfaults, and of course I get absolutely no answer from the 
> authors, whom I reminded regularly of the problem. 
>
> To be honest, I feel like removing this from Sage. That was part of 
> the reason behind that more recent change, which made it an optional 
> package. 
>
> Really, the best you could do to help us is send an email to the 
> authors. Tell them about your problem, and how cool it would be if it 
> worked, as this situation is bad advertisement for everybody. 
> Computing modular decompositions is cool and everything, but we can't 
> just keep buggy code in Sage, even if we raise a warning whenever it 
> is used :-/ 
>
> Nathann 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


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

2015-05-02 Thread Nathann Cohen
Hello !

> I would like to know if there is any workaround for solving this issue for
> version 6.6. Unfortunately, there is no dm.c and no random.c in the sage 6.6
> directory structure so as to replace them and so I do not know how to
> proceed.

Sigh... Modular decomposition. A story of many disappointments.

No, right now you will not find those two files in Sage's source code.
They are, however, contained in the optional package that is
downloaded when you run "sage -i modular_decomposition", and all that
is done on them is compile them into a shared library named
libmodulardecomposition (if I remember correctly. Not of my own
computer at the moment) located in SAGE_ROOT/local/lib/. If you
compile this shared library from the new sources, there should not be
any problem. If you do not know how, open the archive and look at
"spkg-install", it contains the lines that do that.

I feel a bit guilty telling you how to make it work on your computer;
for we have a REAL problem with this package. What we need is to get
the original authors to solve it.

1) The old version of the sources (those that we ship) returns wrong
results. For instance on yours, as you were the one who reported it
first.

2) The new version of the sources apparently returns correct results
on your architecture (and on mine), but  not on all of them. Look
at this ticket I opened when you first reported it:
http://trac.sagemath.org/ticket/13744

As you can see, the "new" version still triggers segfaults or wrong
results on some machines that we use to test Sage. Thus, my attempts
at upgrading Sage's version of the code were (rather legitimately)
refused.

I am stuck with those files, and I do not like this situation (at
all). We ship something which returns wrong results, the problem is
fixed by updating to a new version which returns wrong results too or
even segfaults, and of course I get absolutely no answer from the
authors, whom I reminded regularly of the problem.

To be honest, I feel like removing this from Sage. That was part of
the reason behind that more recent change, which made it an optional
package.

Really, the best you could do to help us is send an email to the
authors. Tell them about your problem, and how cool it would be if it
worked, as this situation is bad advertisement for everybody.
Computing modular decompositions is cool and everything, but we can't
just keep buggy code in Sage, even if we raise a warning whenever it
is used :-/

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


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

2015-05-02 Thread Paulo Seijas
Dear Nathann,

I have just installed sage 6.6 and found out that the bug is still there 
and that I am not able to apply the same workaround as before. I used to 
replace dm.c and random.c, apply touch to modular_decomposition.pyx and do 
sage -b. That used to be enough. But I do not know how to reproduce this 
workaround in version 6.6.

I did the following. I installed sage 6.6 by uncompressing 
sage-6.6-x86_64-Linux-Ubuntu_14.04_x86_64.tar.gz. Since sage complained 
that modular_decomposition package was not installed, I proceeded to 
install the package using "sage -i modular_decomposition" plus "sage -b". 
Now the package is installed, but modular_decomposition behaves as it did 
when I frst started this post (except that it nows displays a warning 
claiming that it is known to return wrong results).

I would like to know if there is any workaround for solving this issue for 
version 6.6. Unfortunately, there is no dm.c and no random.c in the sage 
6.6 directory structure so as to replace them and so I do not know how to 
proceed.

Thank you for your help.

Best,
Paulo

On Saturday, November 24, 2012 at 12:00:21 AM UTC-3, Nathann Cohen wrote:
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: A typo in command line options for Sage

2015-05-02 Thread Dima Pasechnik
this is now https://github.com/sagemath/sage/pull/40

On Saturday, 2 May 2015 08:27:37 UTC+1, Han Xiao wrote:
>
> I think in line 46 and line 139 of the command line options for Sage 
> sage/src/bin/sage 
> 
> it should be 'current' instead of 'currend', even though I'm not a native 
> English speaker.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] bug in Graph is_subgraph method

2015-05-02 Thread Vincent Delecroix
If you consider the documentation of the function you will see

def is_subgraph(self, other, induced=True):
"""
Tests whether ``self`` is a subgraph of ``other``.

 .. WARNING::

Please note that this method does not check whether ``self``
contains a subgraph *isomorphic* to ``other``, but only if it
directly contains it as a subgraph !

Now your two triangles have labels 0,1,4 and 2,3,5. Which are different
from the one in "ExSW". So this method returns False as expected.

You can access the documentation of any function in Sage with the
question mark (and with two you access the source code).

sage: h.is_subgraph?

Vincent

On 02/05/15 09:13, Craig E Larson wrote:
> Graph("E`oo") is the disjoint union of 2 triangles. Graph("ExSW") is two 
> triangles with 2 more edges connecting them. So the first graph is a 
> subgraph (a non-induced subgraph) of the second graph. But Sage reports 
> that it is not. Both graphs have order 6.
> 
> sage: h=Graph("E`oo")
> sage: g=Graph("ExSW")
> sage: h.is_subgraph(g,induced=False)
> False
> 
> This behavior is in "Sage Version 6.5, Release Date: 2015-02-17".
> 
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] A typo in command line options for Sage

2015-05-02 Thread Han Xiao
I think in line 46 and line 139 of the command line options for Sage 
sage/src/bin/sage 

it should be 'current' instead of 'currend', even though I'm not a native 
English speaker.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] bug in Graph is_subgraph method

2015-05-02 Thread Craig E Larson
Graph("E`oo") is the disjoint union of 2 triangles. Graph("ExSW") is two 
triangles with 2 more edges connecting them. So the first graph is a 
subgraph (a non-induced subgraph) of the second graph. But Sage reports 
that it is not. Both graphs have order 6.

sage: h=Graph("E`oo")
sage: g=Graph("ExSW")
sage: h.is_subgraph(g,induced=False)
False

This behavior is in "Sage Version 6.5, Release Date: 2015-02-17".



-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.