Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Looking for OpenMP trick

Greynolds__Alan
Beginner
247 Views
Whencompiling withOpenMP active you can include additional normal Fortran statements with the sentinel

!$ fortran statement

Is there a platform-independent way to do the opposite? In other words, when OpenMP is enabled to comment out or disablenormal Fortran statements.

Al Greynolds
www.ruda.com
0 Kudos
1 Reply
Steven_L_Intel1
Employee
247 Views
Sort of. Most implementations support cpp-style preprocessing. (With Intel fortran enable it with /fpp) So if you enable that, you can do something like:

#ifndef _OPENMP
... code to compile if OpenMP not requested
#endif

I am pretty sure that _OPENMP is a "standard" define everywhere OpenMP is supported.
0 Kudos
Reply