Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
27979 Discussions

ifort fails to respect the OpenMP task despendency

BSC_support
Beginner
837 Views

Build Number: OneApi 2021.3.0
Environment: Linux 4.4.59-92.20
Reason: Defect

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.

Labels (2)
0 Kudos
4 Replies
ShanmukhS_Intel
Moderator
795 Views

Hi,


Thanks for reaching out to us. We are working on your issue. We'll get back to you soon.


Best Regards,

Shanmukh.SS


0 Kudos
Khalik_K_Intel
Moderator
749 Views

Hello,


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.


Regards,

Khalik.


0 Kudos
BSC_support
Beginner
739 Views

Thank you Shanmukh and Khalik. 

0 Kudos
Barbara_P_Intel
Moderator
250 Views

I realize this fix took some time to come. But the reproducer is now compiling and running successfully with ifx 2023.0.0. This compiler was released in December as part of oneAPI HPC Toolkit 2023.0.

Give it a try!

 

 

0 Kudos
Reply