[Openmp-commits] [PATCH] D101123: [OpenMP] Avoid reading uninitialized parallel level values
Giorgis Georgakoudis via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Apr 23 09:32:46 PDT 2021
ggeorgakoudis added a comment.
In D101123#2712461 <https://reviews.llvm.org/D101123#2712461>, @jdoerfert wrote:
> In D101123#2712248 <https://reviews.llvm.org/D101123#2712248>, @ggeorgakoudis wrote:
>
>> Does this work correctly with a nested parallel region in SPMD mode? I think the zeroing-out of the parallel-level is needed for this case.
>
> The parallel level in SPMD mode can never be zero. It is 1 in the beginning and then can only be higher as we enter serialized parallel regions (Inc/Dec level in *_serialized_parallel).
I don't think it's going to enter the serialized parallel execution because the parallelLevel is not incremented in the parallel call. Perhaps we need to init parallelLevel in spmd_init to 0, if that doesn't cause any problems in other parts of the runtime, and leave the handling of the parallelLevel inside the parallel call. We should also add a test for nested parallel regions in SPMD mode too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101123/new/
https://reviews.llvm.org/D101123
More information about the Openmp-commits
mailing list