Problems using f2py module in python code

I have FORTRAN code that requires the following compilation command

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

I compiled the same with 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) 

Unable to compile module. It gives an error indicating an invalid file format '' in '-ffized-format'

Please, help

+6
source share
1 answer

Neither -ffixed-format nor -ffix-line-length-none are valid gfortran parameters. Use -ffixed-form and -ffixed-line-length-none .

+1
source

Source: https://habr.com/ru/post/920423/


All Articles