From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 9F5DF3858D1E; Fri, 20 Jan 2023 14:20:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F5DF3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674224444; bh=r03XaBYgA5lKzxieKUt4C0CErR/NuJFapMzJr3brHcI=; h=From:To:Subject:Date:From; b=Ob2t/WPK3G5o3UmKyNj0qLCQZhpMK0dm4ajcsqGlGZMyJYdtIucqak7pq9nNYRXWE FQAF9UORtWWF+RleTF+8N0cXqOVwfPTQ0jABE9WdPOgVy0kmDBrx0+KMU9zTdEAg0W Kah58dKXIS8QV5DDGh4+Sh9dKeG4jq0R5FuPF5zA= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] Force '--param openacc-kernels=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c' X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/devel/omp/gcc-12 X-Git-Oldrev: e7d4bcb974915bfe95be6c385641fc66a4201581 X-Git-Newrev: 9dde5e1fd14eb336afe161c0b43c74b522e20f3e Message-Id: <20230120142044.9F5DF3858D1E@sourceware.org> Date: Fri, 20 Jan 2023 14:20:44 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9dde5e1fd14eb336afe161c0b43c74b522e20f3e commit 9dde5e1fd14eb336afe161c0b43c74b522e20f3e Author: Thomas Schwinge Date: Tue Jan 17 09:56:15 2023 +0100 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'. Diff: --- libgomp/ChangeLog.omp | 3 ++ .../testsuite/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