From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id B43743858D20 for ; Fri, 20 Jan 2023 14:22:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B43743858D20 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.97,232,1669104000"; d="scan'208,223";a="95146381" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 20 Jan 2023 06:22:56 -0800 IronPort-SDR: ndUUUUAjEeVJ84okoS83aUSgfCKuHXdEo1mqdAOBU5EaEKtttFMvR5E7s1cOz1OOp17hJN208b Yn3AQTTf6FqReAphyMzuJLEGfH6NhA44S73NT4oRThD7KvQWgWTe0Tz/xrDLj2UgSmbEOcB+pg 0UCFmK/fl0PccQUwaYXXBv94Ep0+LAcJFWqa+csOgQzXx+ufz9X+sgTy0j7d/79R37+HcNubMn DKxmS27NhM0uKaJN/skDPszfs8JYR4TCsjzKI41evFr3q+lnzVZ/x91XOYPwGtXf5GG8eSBAG4 QgU= From: Thomas Schwinge To: CC: Frederik Harwath Subject: [og12] Force '--param openacc-kernels=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c' User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 20 Jan 2023 15:22:47 +0100 Message-ID: <87tu0l5lqg.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! Not sure what's going on, but until we get to look into that, I've pushed to devel/omp/gcc-12 commit 9dde5e1fd14eb336afe161c0b43c74b522e20f3e "Force '--param openacc-kernels=3Dparloops' in 'libgomp.oacc-c-c++-common/a= bort-3.c'", see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Force-param-openacc-kernels-parloops-in-libgomp.oacc.patch" >From 9dde5e1fd14eb336afe161c0b43c74b522e20f3e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Jan 2023 09:56:15 +0100 Subject: [PATCH] Force '--param openacc-kernels=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c' libgomp/ * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Force '--param openacc-kernels=parloops'. --- libgomp/ChangeLog.omp | 3 + .../libgomp.oacc-c-c++-common/abort-3.c | 57 +++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 23e93495b62..0f8fca4e71c 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,8 @@ 2023-01-20 Thomas Schwinge + * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Force + '--param openacc-kernels=parloops'. + * testsuite/libgomp.c/simd-math-1.c: Fix configuration. 2023-01-19 Tobias Burnus diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/abort-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/abort-3.c index bca425e8473..3ba4ef76ade 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/abort-3.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/abort-3.c @@ -1,4 +1,61 @@ /* { dg-do run } */ +/* This test case is meant to 'abort' in device execution, which works as + expected with '--param openacc-kernels=parloops': + + GCN: + + GCN Kernel Aborted + + nvptx: + + libgomp: cuStreamSynchronize error: unspecified launch failure (perhaps abort was called) + + ..., or: + + libgomp: cuStreamSynchronize error: an illegal instruction was encountered + + However, with '--param openacc-kernels=decompose', for '-O0', '-O1', this + does *not* 'abort' in device execution, but instead we run into whatever the + compiler generates for (implicit) host-side '__builtin_unreachable ()': + + Segmentation fault (core dumped) + + ..., or: + + Illegal instruction (core dumped) + + (This, unfortunately, still means "correct" execution of this test case...) + + And, with '--param openacc-kernels=decompose', with '-O2' and higher, we + get things like the following: + + GCN: + + libgomp: Called kernel must be initialized + + ..., potentially followed by: + + libgomp: Duplicate node + WARNING: program timed out. + + nvptx: + + libgomp: cuModuleLoadData error: unspecified launch failure + + ..., or: + + libgomp: cuModuleLoadData error: an illegal instruction was encountered + + That is, for nvptx, the code doesn't even load? + + Worse, on one system, this process then shows 100 % CPU utilization, GPU + locks up; process un-SIGKILLable, system needs to be (forcefully) rebooted. + + Until we understand what's happening (how the decomposed OpenACC 'kernels' + code is different from 'abort-1.c', for example), play it safe: + + { dg-additional-options {--param openacc-kernels=parloops} } +*/ #include #include -- 2.25.1 --=-=-=--