我们有一个库,由Cython(core.so)作为模块链接。 它使用BLAS,但希望使用-undefined,dynamic-lookup选项进行编译 BLAS将在运行时加载。
在Enthought Python Distribution中,以下解决方案完美运行:
import numpy #This apparently loads the shared BLAS library
import core
我们在Ubuntu 10.04中的'vanilla''python发行版上尝试了它,并通过apt-get安装了numpy(并以相同的方式安装了liblapack-dev,libblas-dev)。 它没有找到BLAS库。我们怎样才能让它以与环保署相同的方式运作?
更新:
这样做是为了获得与numpy相同的BLAS。例如,在Mac Os X框中,EPD再次编译为MKL,并且比可用的BLAS(加速框架)快得多。
numpy.show_config()
的输出是:
blas_info:
libraries = ['blas']
library_dirs = ['/usr/lib64']
language = f77
lapack_info:
libraries = ['lapack']
library_dirs = ['/usr/lib64']
language = f77
atlas_threads_info:
NOT AVAILABLE
blas_opt_info:
libraries = ['blas']
library_dirs = ['/usr/lib64']
language = f77
define_macros = [('NO_ATLAS_INFO', 1)]
atlas_blas_threads_info:
NOT AVAILABLE
lapack_opt_info:
libraries = ['lapack', 'blas']
library_dirs = ['/usr/lib64']
language = f77
define_macros = [('NO_ATLAS_INFO', 1)]
atlas_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
atlas_blas_info:
NOT AVAILABLE
mkl_info:
NOT AVAILABLE