Re: Is there a Fortran equivalent of C's #ifdef ??

Dave wrote:
Tim Prince wrote:
Compilers which support OpenMP will support cpp style #ifdef pre-processing.

Is there any way to find out if the compiler does support OpenMP? Obviously if I can be sure the compiler supports it, then I can test it that way.

I don't believe Tim's statement is correct. OpenMP has its own conditional compilation syntax which is not cpp-style and is more restrictive. Support of OpenMP does not, as far as I know, imply support of cpp-style conditional compilation.

Now it is true that many current Fortran compilers do support cpp-style directives - you may need to use a switch or name the file with an uppercase file type (F or F90). I recommend reading your compiler's documentation to see what it supports and how to enable it.

Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
Intel Software Development Products Support
My Fortran blog