Code: Select all
!$OMP TASKGROUP !$OMP SINGLE !$OMP TASK depend(inout:a(1:1)) print *, "Hello from Task 1" ! Do something with a(:) !$OMP CANCEL TASKGROUP !$OMP END TASK !$OMP TASK depend(inout:a(1:1)) print *, "Hello from Task 2 !$OMP END TASK !$OMP END SINGLE !$OMP END TASKGROUP
This seems like a nasty trap for the unwary programmer, and not terribly useful. Can we suggest adding an implicit cancellation point at the start of a task?
Or at least a phrase guaranteeing that dependent tasks of a task that executes a cancel will not execute?