[Nauty-list] Multithreading

Brendan McKay bdm at cs.anu.edu.au
Thu Oct 18 11:30:11 EST 2012

Hi Susan,

For months Adolfo Piperno and I have been struggling to ready 
nauty 2.5 for general distribution.  For most users the main
changes are that Adolfo's program Traces is incorporated, and
that both Traces and sparse nauty are available in dreadnaut.

A lesser change is that you can compile it for thread-local
storage if your compiler and linker support it.  If you want
to use both the default version and thread-local versions, I
suggest that you install it in two separate directories, as the
same file names will be used.  Keeping track of the versions 
will be a pain as always, but can be moderated by linking your
programs with the library file nauty.a that is created instead
of using multiple *.o files.

To compile the default version, do as usual:
   ./configure ; make
To compile the thread-local version, do this:
   ./configure --enable-tls ; make
(This includes tests of whether thread-local storage is available.)

In all cases, nauty.h will define two preprocessor variables:
HAVE_TLS which is 1 if TLS is selected and available, and 0 otherwise;
and TLS_ATTR which is empty of TLS is off and the TLS attribute name
(such as "__thread" in gcc-land) otherwise.  All (we hope!)
appropriate variables in the nauty files have TLS_ATTR added to
their attribute lists.  You have to make sure you compile your
own program with the correct set of *.h files.

This facility is hardly tested so far; it is one of our remaining
tasks before version 2.5 is released. I'll be in touch off-list with
more information.


* Susanne Nieß <niess at ma.tum.de> [121018 02:25]:
> Has the option for multithreading by now incorporated into nauty? If
> not, I need some help again. I have now "treated" the .c and -h
> files with mkts (thanks for this script!) but I think that still
> something has to be done about the .o files. I might get there by
> altering makefile but this would be a lot of work and I am not
> really sure which files must be altered so I first want to ask if
> this is the correct way at all and if there is an easier way. In
> addition, I had the idea of copying the nauty files into a new
> directory and make them fit for multithreading there without putting
> a 't' in front of each filename; this would probably make some
> things less difficult and I suppose the old makefiles would do then
> but as I am not familiar with pearl I am not sure how to alter mkts
> to use it for this method. Could you please help me?
> Susanne Nieß
> _______________________________________________
> 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