- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FWIW, I do not see this with 2018 or 2015...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep, that is a compiler error, you should file a support request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Until we can resolve this, try adding "-qno-openmp-simd" to your command line.
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page