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!