including fixed format header file in fortran 90 program

Hi

I’m trying to include mpef.h which is in the old fixed format in my fortran 90 code. But I’m getting errors like this :

mpif90 -Mextend -Mfree -lgmp -o -mpilog mgv.log init.f90 defs.f90 indices.f90 exchange.f90 bsolve.f90 rsolve.f90 residual.f90 rmsnorm.f90 blockv.f90 restrict.f90 interpolate.f90 getsolution.f90 main.f90 -lm
init.f90:
defs.f90:
indices.f90:
exchange.f90:
bsolve.f90:
rsolve.f90:
residual.f90:
rmsnorm.f90:
blockv.f90:
restrict.f90:
interpolate.f90:
getsolution.f90:
main.f90:
PGF90-S-0034-Syntax error at or near end of line (/usr/include/mpef.h: 1)
PGF90-S-0034-Syntax error at or near identifier fortran (/usr/include/mpef.h: 2)
PGF90-S-0034-Syntax error at or near end of line (/usr/include/mpef.h: 3)
PGF90-S-0034-Syntax error at or near end of line (/usr/include/mpef.h: 4)
PGF90-S-0034-Syntax error at or near * (/usr/include/mpef.h: 5)
PGF90-S-0034-Syntax error at or near * (/usr/include/mpef.h: 6)
PGF90-S-0034-Syntax error at or near * (/usr/include/mpef.h: 7)
---------------------------------------------------------------------
Please let me know how to fix this

thanks
kiran

Hi Kiran,

There isn’t any good way to mix free and fixed form in the same source file. It might work sometimes depending upon the code, but not usually. You’ll need to port the header file.

Sorry,
Mat