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

OneAPI Fortran OpenMP Compile Issue

dstowe
Beginner
349 Views

Starting with OneAPI 2022.3, we've had an issue where OpenMP (OMP) sentinels which used to work now cause a compilation error. Attached is a simple and pointless program which recreates the issue.

 

In our code, for readability purposes we have OMP sentinels with line continuations as seen in the recreator program. OneAPI 2022.3 will compile and vectorize if we move all the OMP inputs onto a single line, but it fails with the line continuations. Here is a snippet of the offending OMP sentinels in the recreator program:

do i = 1, n             
   !$OMP SIMD &         
   !$OMP& lastprivate(k)
   do j = a(i), a(i+1)-1
      k = b(j)          
   enddo                
enddo                   

 Here is a snippet of the errors we receive:

openmp_test.f90(29): error #5082: Syntax error, found 'DO' when expecting one of: PRIVATE REDUCTION COLLAPSE ORDER LASTPRIVATE SAFELEN EARLY_EXIT ASSERT NONTEMPORAL ...
      do j = a(i), a(i+1)-1
------^
openmp_test.f90(29): error #5082: Syntax error, found ',' when expecting one of: <END-OF-STATEMENT> ;
      do j = a(i), a(i+1)-1
-----------------^
openmp_test.f90(27): error #7644: The statement or directive following this OpenMP* directive is incorrect.
      !$OMP SIMD &
------------^

Does anyone have an idea what might be happening? I've searched through issues, release notes, and the OMP spec, but haven't found any hints. Any help is greatly appreciated, thanks!

1 Solution
Barbara_P_Intel
Moderator
315 Views

I get the same thing. But the good news is the error message is gone in the compiler that is planned to be released in the next few weeks!

 

View solution in original post

0 Kudos
2 Replies
Barbara_P_Intel
Moderator
316 Views

I get the same thing. But the good news is the error message is gone in the compiler that is planned to be released in the next few weeks!

 

0 Kudos
dstowe
Beginner
313 Views

That's great news, thank you so much for checking! I'll make sure to give it a shot the first chance I get.

0 Kudos
Reply