Open ohno-fj opened 8 months ago
@llvm/issue-subscribers-flang-frontend
Author: None (ohno-fj)
Task privatisation is incomplete. @psoni2628 is working on this.
Thank you for your comments on the development status.
The issue here seems to be that Flang is using the context of the thread executing the task region to perform the privatization. Then, if a thread executing a task region has already exited its enclosing parallel region, the data used in task's implicit firstprivate will no longer exist.
If !$OMP TASKWAIT
is inserted right before !$OMP END PARALLEL
then the issue doesn't occur.
@ergawy, you are planning to work on delayed privatization for tasks too, right? IIUC, it should fix this issue.
When pointer variable with
private
attribute is output intask
construct, execution terminates abnormally.The following are the test program, Flang-new, Gfortran and ifort compilation result.
snes_task_016_2.f90: