public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104783] New: [nvptx, openmp] Hang/abort with atomic update in simd construct
@ 2022-03-04 13:35 vries at gcc dot gnu.org
  2022-03-04 13:48 ` [Bug target/104783] " vries at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2022-03-04 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104783
           Summary: [nvptx, openmp] Hang/abort with atomic update in simd
                    construct
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Minimized from
https://github.com/TApplencourt/OvO/blob/master/test_src/cpp/hierarchical_parallelism/atomic_add-float/target_teams_distribute__parallel_for__simd.cpp
.

Test-case:
...
$ cat libgomp/testsuite/libgomp.c/target_teams_distribute__parallel_for__simd.c 
/* { dg-options "-O2" } */

int
main (void)
{
  const unsigned expected_value = 1;

  unsigned counter_N0 = 0;

#pragma omp target map(tofrom: counter_N0)
#pragma omp simd
  for (int i = 0 ; i < 1 ; i++ )
    {
#pragma omp atomic update
      counter_N0 = counter_N0 + 1 ;
    }

  return 0;
}
...

With target board unix/-foffload=-mptx=3.1:
...
libgomp: cuCtxSynchronize error: unspecified launch failure (perhaps abort was
called)


libgomp: cuMemFree_v2 error: unspecified launch failure

libgomp: device finalization failed
FAIL: libgomp.c/target_teams_distribute__parallel_for__simd.c execution test
...

With target board unix: hangs.

With dg-options -O0:
...
PASS: libgomp.c/target_teams_distribute__parallel_for__simd.c execution test
...

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

end of thread, other threads:[~2022-03-22 13:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 13:35 [Bug target/104783] New: [nvptx, openmp] Hang/abort with atomic update in simd construct vries at gcc dot gnu.org
2022-03-04 13:48 ` [Bug target/104783] " vries at gcc dot gnu.org
2022-03-04 16:16 ` vries at gcc dot gnu.org
2022-03-08 12:51 ` vries at gcc dot gnu.org
2022-03-09  7:16 ` vries at gcc dot gnu.org
2022-03-10 11:22 ` cvs-commit at gcc dot gnu.org
2022-03-10 12:25 ` vries at gcc dot gnu.org
2022-03-22 13:40 ` cvs-commit at gcc dot gnu.org
2022-03-22 13:47 ` vries 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).