[Nauty] Error using nauty with more than 32 vertices?

Nick Penwarden penwan at rpi.edu
Wed Apr 14 01:47:01 EST 2004


Thanks for the suggestion on not using testcanlab, just comparing canon1 with 
canon2 works great.

And I figured out what was wrong...it turns out I had a small error in my 
function for copying graphs causing it only to copy the first setword of a 
row, thus it didn't copy the other setwords when m > 2 and hence my problem. 
It's working now, though. :)

-Nick

On Tuesday 13 April 2004 02:14 am, Brendan McKay wrote:
> * Nick Penwarden <penwan at rpi.edu> [040413 15:59]:
> > I'm calling nauty in my program to determine if two graphs are
> > isomorphic. I am doing so by calling nauty once for each graph to get
> > the canonical sum of the graphs and then comparing them with the
> > testcanlab function. This works perfectly on graphs with <= 32 vertices,
> > but does not work properly for graphs with > 32 vertices. Sometimes it
> > segfaults and sometimes it just returns that the graphs are not
> > isomorphic when they in fact are.
> >
> > I have defined MAXN as 64, and am passing n and m correctly to both
> > nauty and testcanlab. Any ideas?
>
> I'm guessing that you have an array overflow, but it could be other
> things.  Did you declare the graph variables to have at least m*n words?
>
> Incidentally, you don't need the testcanlab function.  The canonical
> graphs can be compared directly using ordinary comparisons:
>
>   nauty(g1,lab,ptn, ..., m,n, canon1);
>   nauty(g2,lab,ptn, ..., m,n, canon2);
>   for (i = 0; i < m*n; ++i)
>       if (canon1[i] != canon2[i]) break;
>   if (i < m*n) { NOT ISOMORPHIC } else { ISOMORPHIC }
>
> You could also use  memcmp(canon1,canon2,m*n*sizeof(graph));
>
> Brendan.
>
> _______________________________________________
> This is the nauty mailing list
> Post messages to nauty-list at cs.anu.edu.au
> nauty page: http://cs.anu.edu.au/~bdm/nauty/
> list page: http://cs.anu.edu.au/mailman/listinfo/nauty-list




More information about the Nauty mailing list