[OpenMP] [libgomp] Limit the number of threads spawned around
Quaquaraquà
nuquaquaraqua@gmail.com
Wed Oct 23 16:02:00 GMT 2019
Hi there,
I'm an external user of a target library written in C++/OpenMP. The library has its own API and it claims to be thread-safe. Internally, its operations are parallelised with the usual #pragma omp parallel for. I'm deploying it on a server with 40 physical threads and invoking the library from 40 (active) logical threads. This creates 40*40=3600 logical threads in the machine. My question is whether there is a way, as external user of this target library, to limit this insanity so that the OpenMP threads use the resources available in a more composed manner (e.g. worker pool) or should I limit myself to interact with this library from a single logical thread?
Thanks in advance,
Yours,
quaquaraqua
--
Quaquaraquà <nuquaquaraqua@gmail.com>
More information about the Gcc-help
mailing list