From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 1C2C5388451F for ; Fri, 18 Mar 2022 07:21:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1C2C5388451F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.90,191,1643702400"; d="scan'208";a="73147655" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 17 Mar 2022 23:21:13 -0800 IronPort-SDR: Xa6QgdzGkX12svf/GwTPCMPWVz99yAqkYYcbr4dlqeqYsv6XFhb+2weHdHnoPSce/sfzNgpSj0 5VBEX/QpCqMR9p7zztryRWIJbcnwQJCN6oPqPJ8JlukBje75ok0EzkbrKSFLpl3n4/qJRsEQxW spwvZDRl7FwW5PX+guzHuL6XHDLkMIOIQe5VhBAKQKuqaSljxDgS/Mmqnk7keAbD/pupCettHH pAA/+C6eHx0URI3DRPGOb7m/T22AqF0Xu/t1NlNmNAu9rDR9+RoAlzXNgEi5IptAaLhwAp2HMY 5s4= From: Thomas Schwinge To: Jakub Jelinek CC: Subject: Re: [PATCH] openmp: Fix up gomp_affinity_init_numa_domains In-Reply-To: References: <20211015192634.69CD8286470F@gskx-2.sc.intel.com> <20211018130308.GA304296@tucnak> <87o86qn8bm.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Fri, 18 Mar 2022 08:21:06 +0100 Message-ID: <877d8rk9p9.fsf@dem-tschwing-1.ger.mentorg.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2022 07:21:15 -0000 Hi Jakub! On 2022-03-17T17:16:04+0100, Jakub Jelinek wrote: > 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 >> . 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 =3D '201511' >> OMP_DYNAMIC =3D 'FALSE' >> OMP_NESTED =3D 'FALSE' >> OMP_NUM_THREADS =3D '8' >> OMP_SCHEDULE =3D 'DYNAMIC' >> OMP_PROC_BIND =3D 'TRUE' >> OMP_PLACES =3D '{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, confirmed to resolve all the 'libgomp.c/places-10.c' FAILs that I've seen on different systems. Gr=C3=BC=C3=9Fe Thomas > 2022-03-17 Jakub Jelinek > > * config/linux/affinity.c (gomp_affinity_init_numa_domains): Move s= een > variable next to pl variable. > > --- libgomp/config/linux/affinity.c.jj 2022-01-11 23:11:23.8872691= 17 +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 =3D line; > void *pl =3D NULL; > + bool seen =3D false; > > while (*p && *p !=3D '\n') > { > unsigned long first, last; > - bool seen =3D false; > > errno =3D 0; > first =3D strtoul (p, &end, 10); > > > Jakub ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955