public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured
@ 2020-05-25 15:56 doko at debian dot org
  2020-05-26  7:17 ` [Bug other/95316] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: doko at debian dot org @ 2020-05-25 15:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

            Bug ID: 95316
           Summary: [10 Regression] binary built with -fopenacc fails to
                    run when not all offload compilers are installed that
                    were configured
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

This is usage regression; in gcc-9 building with

  gcc-9 -o mandel-accel mandel.c -Wall -O2 -fopenacc

and running the mandel-accel binary works, if the nvptx offload compiler is
installed.

Building that with gcc-10 leads to:

$ gcc-10 -o mandel-accel mandel.c -Wall -O3 -fopenacc
lto-wrapper: fatal error: could not find accel/amdgcn-amdhsa/mkoffload in
/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
(consider using ‘-B’)
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed

because gcc-10 was configured with more than one offload target.  Installing
all configured offload compilers works around it, or building for the offload
targets explicitly (-foffload=nvptx-none).

Expected behavior:  Just print a warning when an offload compiler for a target
cannot be found.

Note: the packaged compilers for Debian/Ubuntu are gcc-10, gcc-10-offload-nvptx
and gcc-10-offload-amdgcn.

See https://launchpad.net/bugs/1878760

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
@ 2020-05-26  7:17 ` rguenth at gcc dot gnu.org
  2020-05-26  8:28 ` [Bug other/95316] Offload compilation fails " tschwinge at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-26  7:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |10.2
           Keywords|                            |openacc, openmp

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
  2020-05-26  7:17 ` [Bug other/95316] " rguenth at gcc dot gnu.org
@ 2020-05-26  8:28 ` tschwinge at gcc dot gnu.org
  2020-05-26 12:42 ` doko at debian dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-05-26  8:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |tschwinge at gcc dot gnu.org
   Last reconfirmed|                            |2020-05-26
            Summary|[10 Regression] binary      |Offload compilation fails
                   |built with -fopenacc fails  |when not all offload
                   |to run when not all offload |compilers are installed
                   |compilers are installed     |that were configured
                   |that were configured        |

--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
So the report is not "binary built with -fopenacc fails to run when [...]" but
rather "compilation with -fopenacc fails when [...]"?  And, same for '-fopenmp'
for OpenMP 'target' offloading?  So I'm changing the Summary to: "Offload
compilation fails when [...]".  (Please adjust if I've misunderstood.)

I don't think this is a regression: wouldn't you've gotten the same behavior
already before GCC 10 added GCN offloading, for example, when you had built GCC
with '--enable-offload-targets=nvptx-none' but then didn't have the nvptx
offloading compiler installed?  I'm thus removing the "regression" tag. 
(Please put it back if I've misunderstood.)


I agree that the current driver (?) behavior is not ideal.  I suppose the
default offload targets configuration (unless overridden by '-foffload') should
be made so that if an offload compiler is not present, it is silently skipped. 
That is, without printing a warning (as has been suggested), as that would
produce a lot of noise.  If an offload target has been explicitly requested via
'-foffload=[target]', then that should result in a hard error, of course, if
the respective offload compiler is not available.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
  2020-05-26  7:17 ` [Bug other/95316] " rguenth at gcc dot gnu.org
  2020-05-26  8:28 ` [Bug other/95316] Offload compilation fails " tschwinge at gcc dot gnu.org
@ 2020-05-26 12:42 ` doko at debian dot org
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: doko at debian dot org @ 2020-05-26 12:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

--- Comment #2 from Matthias Klose <doko at debian dot org> ---
I see it as a usage regression, because suddenly a developer using the nxptx
offloading gets an error message about an unrelated offload compiler that
didn't exist before.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
                   ` (2 preceding siblings ...)
  2020-05-26 12:42 ` doko at debian dot org
@ 2020-07-23  6:51 ` rguenth at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-23  6:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.2                        |10.3

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.2 is released, adjusting target milestone.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
                   ` (3 preceding siblings ...)
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.3                        |10.4

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
                   ` (4 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07  8:53 ` rguenth at gcc dot gnu.org
  2023-07-26 22:30 ` burnus@net-b.de
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
                   ` (5 preceding siblings ...)
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
@ 2023-07-07  8:53 ` rguenth at gcc dot gnu.org
  2023-07-26 22:30 ` burnus@net-b.de
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  8:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |---

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/95316] Offload compilation fails when not all offload compilers are installed that were configured
  2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
                   ` (6 preceding siblings ...)
  2023-07-07  8:53 ` rguenth at gcc dot gnu.org
@ 2023-07-26 22:30 ` burnus@net-b.de
  7 siblings, 0 replies; 9+ messages in thread
From: burnus@net-b.de @ 2023-07-26 22:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316

burnus@net-b.de <burnus@net-b.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus@net-b.de

--- Comment #6 from burnus@net-b.de <burnus@net-b.de> ---
Matthias, isn't the issue just that for some reason the local patch, matching
what's nowadays --enable-offload-defaulted, wasn't working properly?

Cf. https://gcc.gnu.org/install/configure.html
and
https://inbox.sourceware.org/gcc-patches/251870a9-85e8-b69b-2f94-841f7548c3ba@ubuntu.com/t/
which also refers to lp #1878760 

At least with --enable-offload-defaulted both at compile time and at libgomp
runtime, no error should be shown if not install.

Can this now be closed as fixed? (I think since GCC 12.)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-26 22:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 15:56 [Bug other/95316] New: [10 Regression] binary built with -fopenacc fails to run when not all offload compilers are installed that were configured doko at debian dot org
2020-05-26  7:17 ` [Bug other/95316] " rguenth at gcc dot gnu.org
2020-05-26  8:28 ` [Bug other/95316] Offload compilation fails " tschwinge at gcc dot gnu.org
2020-05-26 12:42 ` doko at debian dot org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07  8:53 ` rguenth at gcc dot gnu.org
2023-07-26 22:30 ` burnus@net-b.de

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).