Re: [sage-devel] hypergraph.nauty when creating singletons gives SIGSEGV

48 views
Skip to first unread message

Dima Pasechnik

unread,
Aug 15, 2021, 5:55:03 AM8/15/21
to sage-devel
How do you run Sage?
What version, what OS?
How is Sage installed?


On Sun, 15 Aug 2021, 12:16 Leww, <bodn...@gmail.com> wrote:
Using nauty where the result has a singleton anywhere in the result gives an incorrectly segmented return. Below are some examples

1 possible construction:
sage: tuple(hypergraphs.nauty(2, 3, uniform=2))
(((0, 1), (0, 2)),)

1 edge
sage: tuple(hypergraphs.nauty(1, 2, uniform=2))
(((0, 1),),)

1 uniform case
sage: tuple(hypergraphs.nauty(2, 2, uniform=1))
(((0,), (1,)),)

everything together
sage: tuple(hypergraphs.nauty(1, 1, uniform=1))
(((0,),),)

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/137e937a-fd98-4429-b9ca-2e206884e9c6n%40googlegroups.com.

dmo...@deductivepress.ca

unread,
Aug 15, 2021, 2:13:01 PM8/15/21
to sage-devel
I don't think there is any problem -- the output is correct.  (And the original message seems to have been deleted.)  It is just that python prints an extra comma at the end of tuples of length 1, in order to make it clear that the parentheses represent a tuple.  For example:
sage: tuple([tuple([tuple([0])])])                                                                        
(((0,),),)

Dima Pasechnik

unread,
Aug 15, 2021, 2:32:52 PM8/15/21
to sage-devel


On Sun, 15 Aug 2021, 21:13 dmo...@deductivepress.ca, <dmo...@deductivepress.ca> wrote:
I don't think there is any problem -- the output is correct.  (And the original message seems to have been deleted.) 

SIGSEGV certainly is a problem.

dmo...@deductivepress.ca

unread,
Aug 15, 2021, 4:11:44 PM8/15/21
to sage-devel
Yes, SIGSEGV would be a problem, so I apologize if my responses are noise, but my impression is that the term "SIGSEGV" should not have been used.  From reading the text of the post that you replied to, it appears to me that the complaint was about "an incorrectly segmented return", which, from the examples, I interpreted to be a complaint about erroneous commas.  Sorry if I'm off base.

Dima Pasechnik

unread,
Aug 15, 2021, 4:37:29 PM8/15/21
to sage-devel
I certainly can't reproduce a SIGSEGV (i.e. a signal for memory access
violation).
So this is probably a badly formulated subject.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/8ee791ae-f308-4242-9394-216363f9d922n%40googlegroups.com.

Leww

unread,
Aug 16, 2021, 4:14:24 AM8/16/21
to sage-devel
Sorry for the confusion, I made the post assuming that it came from the oddly formatted singleton tuples (now I know why there is an extra comma there). 
Later I found out that the error was caused by something else; since this thread is not deleted here is the true source of the unhandled error

sage: g = Graph(); g.add_edges([[0, 2]]); g.canonical_label(partition=[[0], [1], [2]])

I think that the canonical label function when passing the inputs to bliss doesn't check if the partition matches the vertex set

Dima Pasechnik

unread,
Aug 18, 2021, 2:09:36 AM8/18/21
to sage-devel
On Mon, Aug 16, 2021 at 9:14 AM Leww <bodn...@gmail.com> wrote:
>
> Sorry for the confusion, I made the post assuming that it came from the oddly formatted singleton tuples (now I know why there is an extra comma there).
> Later I found out that the error was caused by something else; since this thread is not deleted here is the true source of the unhandled error
>
> sage: g = Graph(); g.add_edges([[0, 2]]); g.canonical_label(partition=[[0], [1], [2]])
>
> I think that the canonical label function when passing the inputs to bliss doesn't check if the partition matches the vertex set

Thanks, I've opened https://trac.sagemath.org/ticket/32395
to fix this.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/22ad7e6d-2175-4c7c-af1f-b9d9e09a44d6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages