- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i am looking for a syntax to distinguish between ivf and cvf inside a select case (or if .. then .. else) statement.
The syntax shall be placed inside a subroutine. The subroutine is placed inside a module which shall be used in cvf and ivf. [example for problematic source to use in both compilers is :inquire(directory=.., exits=..)]
Thanks in advance
Frank
i am looking for a syntax to distinguish between ivf and cvf inside a select case (or if .. then .. else) statement.
The syntax shall be placed inside a subroutine. The subroutine is placed inside a module which shall be used in cvf and ivf. [example for problematic source to use in both compilers is :inquire(directory=.., exits=..)]
Thanks in advance
Frank
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know if there is a solution using standard Fortran statements like SELECT CASE or IF, but maybe using the compiler's metadirective helps you as well. Example:
!DEC$ IF DEFINED ($CVF)
put your Fortran source code for CVFhere
!cDEC$ ELSE
put your Fortran source code for IVFhere
!DEC$ ENDIF
Then add the variable$CVF to the "Predefined Preprocessor Symbols" (dialog "Project Settings" |"Fortran" tab).
Joerg Kuthe
www.qtsoftware.de
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can distinguish ranges of IVF versions at compile time by the predefined preprocessor macros __INTEL_COMPILER=nnnn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the "for what it's worth" category, CVF defined the macro _DF_VER, and (as Tim pointed out) ifort defines the macro __INTEL_COMPILER
It would be a simple matter to use these to conditionalize code for CVF vs Intel Fortran.
- Lorri

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