public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Quaquaraquà <nuquaquaraqua@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: [OpenMP] [libgomp] Limit the number of threads spawned around
Date: Wed, 23 Oct 2019 16:02:00 -0000	[thread overview]
Message-ID: <20191023180157.50b8bb41cfcc254bfdfe3672@gmail.com> (raw)

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>

                 reply	other threads:[~2019-10-23 16:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191023180157.50b8bb41cfcc254bfdfe3672@gmail.com \
    --to=nuquaquaraqua@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).