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: 1729667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nz1tq0l2Kz23fT for ; Sat, 21 Jan 2023 01:23:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BEE193858000 for ; Fri, 20 Jan 2023 14:23:07 +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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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