- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an OpenMP compiler directives question.
The book I have states that a line begins with one of the following prefix keywords:
!$OMP ...
c$OMP...
*$OMP...
These will be treated as an openMP directive by openMP compiler and treated as a comment by a non-openmp compiler.
In my code, I have
'!$OMP parallel do 'which works fine. In addition, inside the parallel do region, I also have
'!$ I = OMP_GET_THREAD_NUM()'
which works fine for an openMP compiler and treated as a comment by a non-openmp compiler.
However, if I have
'!$OMP I = OMP_GET_THREAD_NUM()'
I will have invalid directive error when I compile it.
My question is why '!$ ' instead of '!$OMP ' works for this case? I thought that '!$OMP ' is standard prefix form for OpenMP. Is prefix different for openMP directive and library?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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