From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Frederik Harwath <frederik@codesourcery.com>
Subject: [og12] Force '--param openacc-kernels=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c'
Date: Fri, 20 Jan 2023 15:22:47 +0100 [thread overview]
Message-ID: <87tu0l5lqg.fsf@euler.schwinge.homeip.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Force-param-openacc-kernels-parloops-in-libgomp.oacc.patch --]
[-- Type: text/x-diff, Size: 3039 bytes --]
From 9dde5e1fd14eb336afe161c0b43c74b522e20f3e Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
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 <thomas@codesourcery.com>
+ * 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 <tobias@codesourcery.com>
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 <stdio.h>
#include <stdlib.h>
--
2.25.1
reply other threads:[~2023-01-20 14:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu0l5lqg.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=frederik@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).