[Nauty] Nauty as a library?
Brendan McKay
Brendan.McKay at anu.edu.au
Tue Nov 10 01:49:42 AEDT 2020
Hi Matheiu,
If you configure with --enable-tls then you can run nauty and
Traces in parallel Posix threads. You can also use OpenMPI threads
provided you have a compiler that implements "thread private"
compatibly with "thread local", which is true for recent versions
of gcc for example and compulsory for OpenMPI 5.1 conformity.
Use the same nauty.h to compile your code.
I strongly recommend calling nauty_check(), see the manual, in
one of your threads to check that the same tls setting is in use
by your code and the nauty routines you are linking with.
The next major release will be fully re-entrant and thread-safe
without relying on thread local storage.
A problem with install is that there is no clear place to put it.
Existing packages (multiple Linux forks, homebrew and macports
for Mac) have their own ideas, and packages like sagemath and
gap which rely on nauty also have their own locations for it. I can't
please everyone, and just enforcing some choice will lead to conflicts.
I guess I can make an innocuous default such as current directory.
Brendan.
On 8/11/20 9:03 pm, Mathieu Dutour wrote:
> I would like to use nauty (and more precisely Traces) for some enumeration
> computation in mathematics (Enumeration of Ctypes in dimension 6 for the
> one interested).
>
> I need to do a lot of canonical form computation and thus I want to link
> my C++ program with nauty.
>
> There are several problems with that:
> 1) The "configure script" does not apparently have the option of making
> installation with "make install" which is strange.
> 2) The Makefile creates static but not dynamic libraries. Probably a minor
> problem. Why can't we have a single library?
> 3) I would like to use nauty in a multithreaded program with each thread
> making its own calls. This might create problems with global variables
> whose value changes. Does the "--enable-tls" configure option addresses
> this?
>
> In general, it would be good to have documentation on the use of nauty
> as a library.
>
> Best,
>
> Mathieu
> _______________________________________________
> Nauty mailing list
> Nauty at anu.edu.au
> http://mailman.anu.edu.au/mailman/listinfo/nauty
More information about the Nauty
mailing list