Feb. 28, 2007
2:25 p.m.
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