public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/99005] New: libgomp runtime does not support AMD GPU offloading for OpenACC directives
@ 2021-02-08 15:52 kd486 at cam dot ac.uk
  2021-02-08 19:57 ` [Bug libgomp/99005] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kd486 at cam dot ac.uk @ 2021-02-08 15:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99005
           Summary: libgomp runtime does not support AMD GPU offloading
                    for OpenACC directives
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kd486 at cam dot ac.uk
  Target Milestone: ---

Created attachment 50143
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50143&action=edit
Sample code with single OpenACC directive in for loop

Simple Gfortran compiled OpenACC code crashes. Code used attached and compiled
with:
gfortran -fopenacc -Wall -Wextra -foffload=amdgcn-amdhsa="-march=gfx900" -c
mymodule.f90

The server has an AMD EPYC 7742 CPU with 4 Vega 20 AMD GPUs.

Runtime error:

 ./main 

libgomp: GCN fatal error: Run-time could not be initialized
Runtime message: HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to
allocate the necessary resources. This error may also occur when the core
runtime library needs to spawn threads or create internal OS-specific events.

Code runs fine without GPU offloading, or with offloading with PGI compiler.

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

* [Bug libgomp/99005] libgomp runtime does not support AMD GPU offloading for OpenACC directives
  2021-02-08 15:52 [Bug fortran/99005] New: libgomp runtime does not support AMD GPU offloading for OpenACC directives kd486 at cam dot ac.uk
@ 2021-02-08 19:57 ` burnus at gcc dot gnu.org
  2021-02-08 21:47 ` kd486 at cam dot ac.uk
  2021-02-09  7:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-02-08 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Kiril Dichev from comment #0)
> Code runs fine without GPU offloading, or with offloading with PGI compiler.

With PGI + offloading: that's for that AMD Vega machine or for some Nvidia
system?

> Sample code with single OpenACC directive in for loop

The example code just contains only a module without a main program. Hence, I
added at the end:

use mymodule
implicit none (external, type)
call init
call do_work
call terminate
end

Using that on a gfx906 Vega 20 with GCC 11.0.0 20210203 and -march=gfx906 – and
works fine.

I have now also tried it with: gcc version 10.2.1 20210206 – same result.

 * * *

Especially assuming that AMD system is not the same system as the system used
with the PGI compiler: If I look for HSA_STATUS_ERROR_OUT_OF_RESOURCES, I run
into https://github.com/RadeonOpenCompute/ROCm/issues/1080

That person did have such an error due to permission problems. I assume that it
works on your side, but just to check: Does /opt/rocm/bin/rocminfo work?

If it does, does the program as above work (your module + the lines by me to
run it)? Are there more messages? Which compiler version did you use? Is this a
Linux vendor compiler (which one?), some pre-compiled compiler or self
compiled?

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

* [Bug libgomp/99005] libgomp runtime does not support AMD GPU offloading for OpenACC directives
  2021-02-08 15:52 [Bug fortran/99005] New: libgomp runtime does not support AMD GPU offloading for OpenACC directives kd486 at cam dot ac.uk
  2021-02-08 19:57 ` [Bug libgomp/99005] " burnus at gcc dot gnu.org
@ 2021-02-08 21:47 ` kd486 at cam dot ac.uk
  2021-02-09  7:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: kd486 at cam dot ac.uk @ 2021-02-08 21:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Kiril Dichev <kd486 at cam dot ac.uk> ---
Yes, I can confirm that there seems to be an underlying issue with permissions,
similar to the link you posted (rocminfo gives me the same error).

Indeed, I was referring to compilation with PGI on an Nvidia system.

Looks like this is not a bug. Sorry.

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

* [Bug libgomp/99005] libgomp runtime does not support AMD GPU offloading for OpenACC directives
  2021-02-08 15:52 [Bug fortran/99005] New: libgomp runtime does not support AMD GPU offloading for OpenACC directives kd486 at cam dot ac.uk
  2021-02-08 19:57 ` [Bug libgomp/99005] " burnus at gcc dot gnu.org
  2021-02-08 21:47 ` kd486 at cam dot ac.uk
@ 2021-02-09  7:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-09  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2021-02-09  7:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 15:52 [Bug fortran/99005] New: libgomp runtime does not support AMD GPU offloading for OpenACC directives kd486 at cam dot ac.uk
2021-02-08 19:57 ` [Bug libgomp/99005] " burnus at gcc dot gnu.org
2021-02-08 21:47 ` kd486 at cam dot ac.uk
2021-02-09  7:19 ` rguenth at gcc dot gnu.org

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