public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] openmp: Fix up gomp_affinity_init_numa_domains
Date: Thu, 17 Mar 2022 17:16:04 +0100	[thread overview]
Message-ID: <YjNexEa9NUb+odp4@tucnak> (raw)
In-Reply-To: <87o86qn8bm.fsf@euler.schwinge.homeip.net>

Hi!

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.
I'll test it tonight in my bootstrap/regtest (but that's a non-numa box),
can somebody with a box where places-10.c fails reliably test this too?

Thanks.

2022-03-17  Jakub Jelinek  <jakub@redhat.com>

	* config/linux/affinity.c (gomp_affinity_init_numa_domains): Move seen
	variable next to pl variable.

--- libgomp/config/linux/affinity.c.jj	2022-01-11 23:11:23.887269117 +0100
+++ libgomp/config/linux/affinity.c	2022-03-17 17:05:38.129008653 +0100
@@ -411,11 +411,11 @@ gomp_affinity_init_numa_domains (unsigne
 	    {
 	      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);


	Jakub


  reply	other threads:[~2022-03-17 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 19:26 [r12-4438 Regression] FAIL: libgomp.c/places-10.c execution test on Linux/x86_64 sunil.k.pandey
2021-10-18 13:03 ` [committed] openmp: Fix handling of numa_domains(1) Jakub Jelinek
2021-11-11 13:14   ` Thomas Schwinge
2022-03-17 16:16     ` Jakub Jelinek [this message]
2022-03-18  7:21       ` [PATCH] openmp: Fix up gomp_affinity_init_numa_domains Thomas Schwinge

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=YjNexEa9NUb+odp4@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.com \
    /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).