- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I have a quick question regarding the #ifdef and #endif for preprocessing. I have the following code piece in my fpp file:
#ifdef USE_SIMD !DIR$ SIMD #endif do i = is, ie dF(i + offset_kj) = dF(i + offset_kj) + value * F(i + offset_ii) end do
After preprocessing, I got the following code piece in the f90 file:
!DIR$ SIMD do i = is, ie dF(i + offset_kj) = dF(i + offset_kj) + value * F(i + offset_ii) end do
There is a blank line between the SIMD directive and the do i loop. I think it is generated by the #endif directive. Is there an easy way to avoid this? I want the SIMD directive to be next to the do i loop.
I would truly appreciate your help!
Best regards,
Wentao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Development indicates there is no way to suppress this blank line with fpp. Sorry.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have not found a way. fpp seems to be operating consist with cpp in this regard also. I inquired with our Developers whether this is possible and will let you know what they say.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't encountered adverse effects from this. I make extensive use of fpp insertion of omp simd in view of the need to make it conditional on __MIC__.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Development indicates there is no way to suppress this blank line with fpp. Sorry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried:
#endif do i = is, ie
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim Prince wrote:
I haven't encountered adverse effects from this. I make extensive use of fpp insertion of omp simd in view of the need to make it conditional on __MIC__.
Thanks for your reply. If the blank line does not influence how !DIR$ SIMD works, then that's fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
Have you tried:
#endif do i = is, ie
Jim Dempsey
Thanks for your reply. But this does not work since the preprocessing will "eat" the do i loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are inclined to use FPP to create a source file that you keep, as opposed to an intermediary file to use as source, then you could easily write a script to remove blank lines following !DEC$ SIMD (and tidy up other things).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
If you are inclined to use FPP to create a source file that you keep, as opposed to an intermediary file to use as source, then you could easily write a script to remove blank lines following !DEC$ SIMD (and tidy up other things).
Jim Dempsey
Thanks for your suggestion:-)
Best,
Wentao

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