Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues when using f2py module in python code

I have a FORTRAN code that required the following compile command

gfortran -c interp.f -ffixed-format -ffix-line-length-none

I compiled the same using f2py module in python

from numpy import f2py

f2py.compile(open('interp.f').read(),modulename='interp',extra_flags='-ffixed-format -ffix-line-length-none',verbose=0)

It is unable to compile the module. It gives an error saying invalid file format '' at '-ffized-format'

Please help

like image 780
Andy Stow Away Avatar asked Jul 13 '12 14:07

Andy Stow Away


Video Answer


1 Answers

Neither -ffixed-format, nor -ffix-line-length-none seem to be valid gfortran options. Consider using -ffixed-form and -ffixed-line-length-none instead.

like image 88
Oleg2718281828 Avatar answered Sep 27 '22 22:09

Oleg2718281828