[Numpy-discussion] f2py and Fortran90 gfortran_filename error

pearu at cens.ioc.ee pearu at cens.ioc.ee
Wed Feb 28 09:25:28 EST 2007


> Hello All:
>
> I was suggested to post this question here with the f2py experts from
> comp.lang.python.
>
> I have been able to use the example F77 files suggested in the f2py
> User Manual, but the problems happened when I tried my own F90 file
> (attached below.
>
> I am able to create a <module_name>.so file using the following method:
>
> (1) Created a Fortran90 program matsolve.f90
>
> Note: The program compiles fine and prints the proper output for the
> simple matrix specified.
>
> (2) f2py matsolve.f90 -m matsolve2 -h matsolve2.pyf
>
> This created the matsolve2.pyf fine
>
> (3) f2py -c matsolve2.pyf --f90exec=/usr/bin/gfortran matsolve.f90

Use
 f2py -c  --fcompiler=gnu95 matsolve2.pyf matsolve.f90

HTH,
Pearu





More information about the NumPy-Discussion mailing list