I don't think it's a problem with preprocessing flags, on Linux it should be automatic for .F90 files. I can check tomorrow if it works with an older ifort. What's really weird is that the PETSC_MAJOR and PETSC_MINOR macros work just fine, as far as i can tell they're defined in the same file as PETSC_VERSION_GE etc.
Sent from my VT-102 Jed Brown <[email protected]> skrev: Åsmund Ervik <[email protected]> writes: > Our nightly Jenkins run revealed that PETSC_VERSION_GE does not work > well with ifort (version 14.0). (It works fine with gfortran and > pgf90.) ifort produces the error message > > petscmod.F90(232): #error: #if: syntax error. Maybe the wrong option indicating that you want preprocessing? It would be useful to get to the bottom of it. > I couldn't figure out much from this error message, but the following > seems to work on all our compilers: > > #if (PETSC_MAJOR >= 3) && (PETSC_MINOR >= 5) > ... PETSC_DEFAULT_REAL > #else > ... PETSC_DEFAULT_DOUBLE_PRECISION > #endif
