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

mixing f77 header files in f90

mhovers
Beginner
524 Views

I have an MPI application, where the mpif.h incude files use 'C' in column 1 for a comment. intel vis fortran says it is an error when it is used in a *.f90 file. where do I find the flag to tell it that C in column 1 is a comment ?

0 Kudos
4 Replies
Steven_L_Intel1
Employee
524 Views

Do this:

[cpp]!DEC$ NOFREEFORM
      INCLUDE 'mpif.h'
!DEC$ FREEFORM[/cpp]

0 Kudos
mhovers
Beginner
524 Views

Do this:

!DEC$ NOFREEFORM INCLUDE 'mpif.h' !DEC$ FREEFORM


Thanks for the help; while I'm sure this works, there is also some way to set a switch in Visual Studio so that the code does not have to be modified. I move the code between Vista and Linux and I would like one version of the code. I have versions that have been put together by others which do not need the !DEC$ lines. The problem is that VS is so damn complicated that each time I get a new project it takes days hunting through the millions of forms and sub forms to find flags and switches (sorry for the******ing).

0 Kudos
Steven_L_Intel1
Employee
524 Views

Sorry, there is no option that will tell the compiler to treat include files as fixed-form. I am surprised that the version of mpif.h you have does not work in free-form as, in the copy of MPICH2 I have, mpif.h is written to be acceptable to both source forms. Perhaps you simply need a newer MPI.

0 Kudos
mhovers
Beginner
524 Views

Sorry, there is no option that will tell the compiler to treat include files as fixed-form. I am surprised that the version of mpif.h you have does not work in free-form as, in the copy of MPICH2 I have, mpif.h is written to be acceptable to both source forms. Perhaps you simply need a newer MPI.

That was it, somehow I got MPICH2 v 1.0.1, when i installed v1.0.8 all is well.

thanks,

0 Kudos
Reply