public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7698] openmp: Fix up gomp_affinity_init_numa_domains
@ 2022-03-18 10:06 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2022-03-18 10:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c0009a3b986a5e07a187aa9533e554a184fc1882

commit r12-7698-gc0009a3b986a5e07a187aa9533e554a184fc1882
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Mar 18 11:02:13 2022 +0100

    openmp: Fix up gomp_affinity_init_numa_domains
    
    On Thu, Nov 11, 2021 at 02:14:05PM +0100, Thomas Schwinge wrote:
    > There appears to be yet another issue: there still are quite a number of
    > 'FAIL: libgomp.c/places-10.c execution test' reports on
    > <gcc-testresults@gcc.gnu.org>.  Also in my testing testing, on a system
    > where '/sys/devices/system/node/online' contains '0-1', I get a FAIL:
    >
    >     [...]
    >     OPENMP DISPLAY ENVIRONMENT BEGIN
    >       _OPENMP = '201511'
    >       OMP_DYNAMIC = 'FALSE'
    >       OMP_NESTED = 'FALSE'
    >       OMP_NUM_THREADS = '8'
    >       OMP_SCHEDULE = 'DYNAMIC'
    >       OMP_PROC_BIND = 'TRUE'
    >       OMP_PLACES = '{0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30},{FAIL: libgomp.c/places-10.c execution test
    
    I've finally managed to debug this (by dumping used /sys/ files from
    an affected system in Fedora build system, replacing /sys/ with /tmp/
    in gcc sources and populating there those files), I think following patch
    ought to fix it.
    
    2022-03-18  Jakub Jelinek  <jakub@redhat.com>
    
            * config/linux/affinity.c (gomp_affinity_init_numa_domains): Move seen
            variable next to pl variable.

Diff:
---
 libgomp/config/linux/affinity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgomp/config/linux/affinity.c b/libgomp/config/linux/affinity.c
index 65d7f968835..5de02b0cd4e 100644
--- a/libgomp/config/linux/affinity.c
+++ b/libgomp/config/linux/affinity.c
@@ -411,11 +411,11 @@ gomp_affinity_init_numa_domains (unsigned long count, cpu_set_t *copy,
 	    {
 	      char *p = line;
 	      void *pl = NULL;
+	      bool seen = false;
 
 	      while (*p && *p != '\n')
 		{
 		  unsigned long first, last;
-		  bool seen = false;
 
 		  errno = 0;
 		  first = strtoul (p, &end, 10);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-18 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 10:06 [gcc r12-7698] openmp: Fix up gomp_affinity_init_numa_domains Jakub Jelinek

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).