public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-13] Force '--param openacc-kernels=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c'
@ 2023-05-19 16:50 Kwok Yeung
0 siblings, 0 replies; only message in thread
From: Kwok Yeung @ 2023-05-19 16:50 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b89599c2e47c89d4b7cf776f9ca6a76deaec6a42
commit b89599c2e47c89d4b7cf776f9ca6a76deaec6a42
Author: Thomas Schwinge <thomas@codesourcery.com>
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 | 5 ++
.../testsuite/libgomp.oacc-c-c++-common/abort-3.c | 57 ++++++++++++++++++++++
2 files changed, 62 insertions(+)
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 150eb7e8eac..56ba5c99244 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,8 @@
+2023-01-20 Thomas Schwinge <thomas@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Force
+ '--param openacc-kernels=parloops'.
+
2023-01-13 Andrew Stubbs <ams@codesourcery.com>
* usm-allocator.c (ALIGN): Use 128-byte alignment.
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-19 16:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 16:50 [gcc/devel/omp/gcc-13] Force '--param openacc-kernels=parloops' in 'libgomp.oacc-c-c++-common/abort-3.c' Kwok Yeung
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).