6

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

3
  • you might try extra_flags="--opt='-O3 -ffixed-format -ffix-line-length-none'" (although I do not guarantee this will work). Commented Jul 13, 2012 at 14:55
  • sorry i meant extra_flags in my post too. Will give it a shot thanks Commented Jul 13, 2012 at 15:00
  • 1
    Also, it should be extra_args after a quick look at the docs. Commented Jul 13, 2012 at 15:01

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.