[f2py] f2py and lapack DLARUV
pearu.peterson at gmail.com
Fri May 20 15:27:43 EEST 2011
On 05/20/2011 03:02 PM, Stephane Raynaud wrote:
> Since the only subroutine used from lapack is DLARUV with no
> dependencies, I folowed your excellent idea :
> f2py -m testmod testfile.f90 -h testfile.pyf
> f2py testfile.pyf dlaruv.f
> It failed on the second phase :
> Block: DLARUV
> Post-processing (stage 2)...
> Tip: If your original code is Fortran source then you must use -m option.
> TypeError: All blocks must be python module blocks but got 'subroutine'
Sorry, I gave wrong commands. The second command should have read:
f2py -c testfile.pyf dlaruv.f
(and no -m option is needed).
> However, it work using the same idea with :
> f2py -m testmod testfile.f90 -h testfile.pyf # setup interface only
> for testfunc
> f2py -c -m testmod testfile.f90 testfile.pyf dlaruv.f # build
> Thus, this solution is sufficient for me, thanks alot !!!
> However, it would be great to have a solution for the when using the
> lapack/blas library itself.
I think this is a local library building problem and not related to
f2py. In general, the `f2py -c ... -lblas -llapack` just works if the
libraries are built properly.
More information about the f2py-users