From patchwork Fri Jan 20 14:22:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 46366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp225967wrn; Fri, 20 Jan 2023 06:23:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXsQEXpAOsnr+KxBRfeynZh5h2dSlJdL3zP7Ie0p3zpApankjmWYDi4jnIqNa6d7y3r3ljcq X-Received: by 2002:a05:6402:43cc:b0:499:376e:6b2d with SMTP id p12-20020a05640243cc00b00499376e6b2dmr19005732edc.0.1674224607462; Fri, 20 Jan 2023 06:23:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674224607; cv=none; d=google.com; s=arc-20160816; b=YZxHY3Qd1v4WmSw2ECYVx/iXwN209gNMs5nnZxTkl1CJZw3SG0E+AopYecCcEuObPA Nu33d3o7ZsHHpsQN0+uuHpumRAV7uqYbV381TlTqjxPjik9PLZkqi+I5fj1R9wOSwkvT Xpmh1BpUcDZw6+I4e0ueFzYiHglI+hwlqwjifdZCVrRyujAYYPfHbLDJKhaKeyDIg+Y1 luzx7WHlhZooHujoPchk0rV1HsEs6sgpnGNYDuG8rTeiGVZ4nkYn2Ym3Wt1P8jBhwaBw zES/06dQJexkgRqLgDxtbQbJAmcBpUXUC/TgDpJtIPrTTEmKuc2B1u6RdrGu97ARX8J/ nyog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:subject:cc:to:from:ironport-sdr:dmarc-filter :delivered-to; bh=8E5C+HglT9qf0T+pkt4MnEzik1JfZwI74K+f92kIsu0=; b=eIi0BNq8qvfpBy9CEniquYnwBxlv+aTRnWAmZRFmVM5U9L3R02kDvY03yorqcx+Nnn vZXdYvHDW3M8bLAYKZKKzTxMCr1wywvWotq4h9eSIxJSVqB5hwCCA2TPt3Y/Sb4xxfg8 /+ahW51YYv8riglWTg3phVvoPGQu+m1a309K/P2b5g0Z1/9I6VN46J2vndRPXe+J7yhX 3nZdXLG2qO6/804Bmr3CkwqnwFAwheamFrqBVLuH/D40O3OFm8mMhqGf6ju+ZWNEI7Ps 7N9SxG6PhdZW32SRVAHMZklbFNMx/HhOU/XOYHsqwhHUU9nDfohhqdKQB97Os8BIee4K 2Ztw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id fg10-20020a056402548a00b0049ed3e10d12si1252972edb.369.2023.01.20.06.23.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 06:23:27 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B28B43857438 for ; Fri, 20 Jan 2023 14:23:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755551742027573031?= X-GMAIL-MSGID: =?utf-8?q?1755551742027573031?= 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=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c'", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 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