Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
55 Views

ifort 2019 parsing omp directives with -qno-openmp

Hey, I am working with some external code that has incorrect OMP directives.  To save you the hassle I made a simple test case below.  I am leaning towards this being a bug based on my expectations, but I am not an OMP expert....

Is there a way to disable parsing of the directives when not intending to use openmp? My expectation using openmp directives, was that the lines should be ignored when not in that mode... I will work to get the directives corrected with the real authors, but that will take a long time and this is just the first of many breaks I would expect from this in a bunch of software.  I would prefer not to bifurcate the code versions by making local changes... instead looking for a flag or something...

Thanks!

 

➜  ifor19_test_omp cat test.f90 
program main

  integer, parameter :: NN =100
  integer :: n

  real :: x, C
  real :: aray(NN), bray(NN)

  x = 1.2345
  C = 1.414

!$omp bad, dont parse me
  do n = 1, NN
     bray(n) = REAL(n)
     aray(n) = bray(n)*x + C
  end do

  print *, aray

end program
➜  ifor19_test_omp ifort -qno-openmp test.f90 
test.f90(12): error #7844: Invalid directive.
!$omp bad, dont parse me
^
compilation aborted for test.f90 (code 1)

 

0 Kudos
5 Replies
Highlighted
55 Views

FWIW, I do not see this with 2018 or 2015...

0 Kudos
Highlighted
Valued Contributor I
55 Views

Yep, that is a compiler error, you should file a support request.

 

0 Kudos
Highlighted
55 Views

Until we can resolve this, try adding "-qno-openmp-simd" to your command line.

          --Lorri

0 Kudos
Highlighted
55 Views

Lorri,

Is the problem related to the fact that

!$omp simd

was appropriated for non-OpenMP declaration of SIMD sections of code?

IOW !$omp simd has been standardized (though within the OpenMP standards) whereas !DIR$ SIMD is Intel (implementation) dependent.

Note that the requirements for !$omp simd can be slightly different than the requirements for !dir$ simd (e.g. wr/t loop split points amongst multiple threads).

Jim Dempsey

0 Kudos
Highlighted
55 Views

Lorri, your workaround was very helpful, and got me past the problem areas, thank you. 

I believe one of our software administrators is going to pass this along via the support channels.

Thanks again!
Garrett

0 Kudos