[Openmp-commits] [PATCH] D95820: [OpenMP] Add bounds to num_teams clause (OpenMP 5.1)

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 12 16:45:57 PST 2021

jdoerfert added inline comments.

Comment at: openmp/runtime/test/teams/kmp_num_teams.c:68
+  }
+  if (a != nteams * nthreads) {
+    fprintf(stderr, "error: a (%d) != nteams * nthreads (%d)\n", a,
hoy wrote:
> Hello, I'm wondering if `nteams` could have an uninitialized use here. It is defined conditionally at line 41. I was seeing `nteams` had a random value. This happened in a very specific testing environment and sorry I cannot provide you a repro. Thanks.
When the encountering thread finished executing the target construct it should have also executed line 41. That said, there might be a capturing issue here. Do we need to capture `nteams` as `shared` explicitly to avoid a firstprivate copy in the target teams region?

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list