Build Number: OneApi 2021.3.0
Environment: Linux 4.4.59-92.20
Description: The binary generated by ifort fails to respect the OpenMP task dependencies between tasks instantiated in a subroutine and the ones instantiated in its internal subroutines.
Observations: Works properly when the variable that creates the dependency is ALLOCATABLE or the array has constant explicit shape.
Steps to Reproduce:
1) Compile the attached test (test.f90) with:
ifort -qopenmp -f test.exe test.f90
2) Set OMP_NUM_THREADS biger than 1
3) Run the test.exe
4) The output of the second task is printed before the first one, which implies that the dependency is not respected.
Expected Result: The tasks execution respects the order specified by the dependencies: the first task completes its execution before the second one starts.
Thank you for contacting Intel Support.
We have reproduced the behavior on our end and it looks like a bug in Intel Fortran Compiler.
I have now passed the information to Intel Fortran development team to have a look.
I will post an update once we get information from the development team.
In the meantime we are glad that you have a workaround available.