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...
➜ 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)
Is the problem related to the fact that
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).
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.