[Nauty-list] Multithreading
Matthew Skala
mskala at cs.umanitoba.ca
Sat Jan 14 04:19:58 EST 2012
On Sat, 14 Jan 2012, Brendan McKay wrote:
> This discussion is very interesting. Actually I was unaware of this
> __thread facility and it seems like a good thing to incorporate
> officially. My current idea is to have an option on "configure" that
> tests if this feature is available and if so turns it on. I think
> leaving it off as default is probably good.
>
> I notice gcc has an option -ftls-model that specifies different
> ways of implementing thread-local variables. Do you have any
> experience of its effect?
I haven't experimented with different settings for that; back when I
started looking at how to use nauty in my threaded program, I found this
document:
http://people.redhat.com/drepper/tls.pdf
which describes in a lot of technical detail exactly how the feature is
implemented on different architectures. But I don't really understand a
lot of what's in there, and I've been just leaving it on the default and
it seems to work.
There is an Autoconf macro for checking for the existence of, and how to
activate, thread-local storage; the documentation implies that "__thread"
is portable to at least one or two other systems besides GCC, and
something similar is available in MSVC via the keyword
"__declspec(thread)" .
http://www.gnu.org/software/autoconf-archive/ax_tls.html
It happens that just today I'm working on autoconfiscating my project,
including my current edit-the-nauty-sources approach to making nauty work
with threads. Having that as a built-in feature of nauty would certainly
make my life easier.
--
Matthew Skala
Postdoctoral Fellow, University of Manitoba
mskala at cs.umanitoba.ca
More information about the Nauty
mailing list