This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] GOMP_CPU_AFFINITY support
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 5 Apr 2007 23:04:52 +0200
- Subject: Re: [gomp] GOMP_CPU_AFFINITY support
- References: <20070404155436.GJ355@devserv.devel.redhat.com>
On Wednesday 04 April 2007 17:54:36 Jakub Jelinek wrote:
> I have committed following patch to libgomp, it is basically what I posted
> last May, except with a couple of bugs fixed.
> See http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00982.html
> for details. Basically for those that really want to have total control
> on which CPUs run which threads this allows them to do so, otherwise has no
> effect.
Jakub,
I played with it and while preparing the docs, some questions arose:
a) is there any way to query the affinity settings from within the app?
b) is there any way to disable the affinity settings after startup?
c) is there any way to disable this feature completely?
d) if GOMP_CPU_AFFINITY="0 1 4" is used on a 4 CPU machine, an error is
printed. How do you handle it internally? Does the implementation discard the
settings completely, or does it ignore the erroneous part only? From tests, I
would assume the former?!
e) will it be ported to 4.2 prior to release?
Questions (a)-(c) relate to inventative people who set GOMP_CPU_AFFINITY=0 (or
similar) for their collegues and those wonder what happend to their nice and
shiny parallelized application that only runs on a single CPU ...
Thanks in advance
Daniel