[Numpy-discussion] Correct way to query NumPy for linktime BLAS and LAPACK

Aron Ahmadia aron@ahmadia....
Mon Aug 5 16:06:54 CDT 2013


Dear NumPy Developers,

In the Clawpack/* repositories [1], we use a mixture of Fortran and Python
source, currently glued together using f2py.

Occasionally, we'll need to link the Fortran code directly against LAPACK.
 In particular, we're using dgeev and dgesv to solve several different
Riemann problems [2,3].

In the past, we've relied on either the operating system or the user to
provide these link commands for us, but it would be ideal in the future if
we could query NumPy for how it is linked.  Currently, the only information
I can find is in the hidden __config__ module of NumPy's distutils module:

    numpy.distutils.__config__.blas_opt_info['extra_link_args']
    numpy.distutils.__config__.lapack_opt_info['extra_link_args']

This seems to suggest that we shouldn't be relying on this information
being available in future versions of NumPy (or at least, not in this
location).  That said, we'd still probably like to use this to avoid the
possibility of multiple BLAS/LAPACK libraries being linked in to our builds.

Any comments?

Thanks,
Aron

[1] https://github.com/clawpack/clawpack
[2]
https://github.com/clawpack/riemann/blob/master/src/rp1_layered_shallow_water.f90#L687
[3]
https://github.com/clawpack/riemann/blob/master/src/rpn2_layered_shallow_water.f90#L478
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130805/6e7cc883/attachment-0001.html 


More information about the NumPy-Discussion mailing list