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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
More minimal, using num_teams and num_threads:
...
int
main (void)
{
#pragma omp target teams num_teams(1) 
  {
    unsigned int i;
#pragma omp distribute parallel for schedule(dynamic,1) num_threads (2)
    for (i = 0;
         i < 1;
         i += 1)
      ;
  }

  return 0;
}
...

I'm not sure how the openmp mapping goes, but with num_threads (2) we still
seem to be launching with 8 threads:
...
  GOMP_OFFLOAD_run: kernel main$_omp_fn$0: launch [(teams: 1), 1, 1] [32,
(threads: 8), 1]
...

Using num_threads(1) results in  the same launch dimentions, but the testcase
does not hang.

Reply via email to