[Nauty-list] Segmentation fault with readg()

Brendan McKay bdm at cs.anu.edu.au
Mon Jun 10 14:22:09 EST 2013


This is not right. As far as I can see, William's program is
completely correct.  It works fine for me.  Have you made
your own changes to the header files?  What version are
you using?

In general MAXN should be defined (unless you want the default,
which is 0) before including the nauty headers.  gtools.h 
automatically includes nauty.h, so you don't need in include
nauty.h yourself.  The same goes for WORDSIZE if you don't
want the default.  Also for MAXM, but there is almost never
any need to change the default for that.

Brendan.

* Tristan Miller <psychonaut at nothingisreal.com> [130610 04:10]:
> Dear all,
> 
> On Sunday 09 June 2013, Tristan Miller wrote:
> > In 2011, a subscriber to this list asked how to read in the graphs
> > produced by geng.  William Rummler's answer
> > <http://dcsmail.anu.edu.au/pipermail/nauty-list/2011-January/000582.html
> > > advised the subscriber to use the opengraphfile() and readg()
> > functions from gtools.h; I quote the example code below.  I tried
> > compiling and running this code but the output doesn't seem to
> > correspond to the given graph, and moreover it seems it always crashes
> > with a segmentation fault on the second call to readg():
> 
> Someone pointed out to me off-list that the problem may be with MAXM.  They 
> were right;  had put an #include "nauty.h" before the #DEFINE MAXN line.  
> Swapping the order solved the problem.
> 
> Regards,
> Tristan
> 
> -- 
>    _
>   _V.-o         Tristan Miller          ><  Space is limited
>  / |`-'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-  <>  In a haiku, so it's hard
> (7_\\    http://www.nothingisreal.com/  ><  To finish what you



> _______________________________________________
> Nauty-list mailing list
> Nauty-list at cs.anu.edu.au
> http://dcsmail.anu.edu.au/cgi-bin/mailman/listinfo/nauty-list





More information about the Nauty mailing list