使用 anaconda 对大矩阵进行对角化时出错 scipy
Error when diagonalising large matrices using anaconda scipy
我最近从在 mac OS X 上使用自制程序 python 切换到使用 anaconda,并且在对角化大型(ish)矩阵时开始出现错误。使用超过 3000x3000 个条目的矩阵调用 scipy.linalg.eigvalsh(A)
会出现错误:
$HOME/anaconda2/lib/python2.7/site-packages/scipy/linalg/decomp.pyc in eigvalsh(a, b, lower, overwrite_a, overwrite_b, turbo, eigvals, type, check_finite)
762 overwrite_a=overwrite_a, overwrite_b=overwrite_b,
763 turbo=turbo, eigvals=eigvals, type=type,
--> 764 check_finite=check_finite)
765
766
$HOME/anaconda2/lib/python2.7/site-packages/scipy/linalg/decomp.pyc in eigh(a, b, lower, eigvals_only, overwrite_a, overwrite_b, turbo, eigvals, type, check_finite)
385 if eigvals is None:
386 w, v, info = evr(a1, uplo=uplo, jobz=_job, range="A", il=1,
--> 387 iu=a1.shape[0], overwrite_a=overwrite_a)
388 else:
389 (lo, hi) = eigvals
ValueError: On entry to ZHBRDB parameter number 12 had an illegal value
最后的错误消息似乎与这个旧的 scipy 问题类似:scipy/issues/5401,但我遇到问题的矩阵要小得多。
运行 print np.__config__.show()
给出:
lapack_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
blas_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
lapack_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
blas_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
None
就目前而言,这是 @brd490 as per the discussion in SciPy issue 8205 and is accepted by the Intel MKL team
友情报告的 MKL 错误
请注意,OpenBLAS 构建的 SciPy 没有此问题。然而,与此同时,我们也注意到 scipy.linalg.eigh
中的最佳工作区数组大小不正确。一旦决定如何更改底层 [= 的签名,这也将得到纠正11=]/?HEEVR
包装。
作为奖励,可能人们能够有选择地计算特征值,因为最初这些例程允许这样做,但在 scipy.linalg.eigh
.
中没有公开
我最近从在 mac OS X 上使用自制程序 python 切换到使用 anaconda,并且在对角化大型(ish)矩阵时开始出现错误。使用超过 3000x3000 个条目的矩阵调用 scipy.linalg.eigvalsh(A)
会出现错误:
$HOME/anaconda2/lib/python2.7/site-packages/scipy/linalg/decomp.pyc in eigvalsh(a, b, lower, overwrite_a, overwrite_b, turbo, eigvals, type, check_finite)
762 overwrite_a=overwrite_a, overwrite_b=overwrite_b,
763 turbo=turbo, eigvals=eigvals, type=type,
--> 764 check_finite=check_finite)
765
766
$HOME/anaconda2/lib/python2.7/site-packages/scipy/linalg/decomp.pyc in eigh(a, b, lower, eigvals_only, overwrite_a, overwrite_b, turbo, eigvals, type, check_finite)
385 if eigvals is None:
386 w, v, info = evr(a1, uplo=uplo, jobz=_job, range="A", il=1,
--> 387 iu=a1.shape[0], overwrite_a=overwrite_a)
388 else:
389 (lo, hi) = eigvals
ValueError: On entry to ZHBRDB parameter number 12 had an illegal value
最后的错误消息似乎与这个旧的 scipy 问题类似:scipy/issues/5401,但我遇到问题的矩阵要小得多。
运行 print np.__config__.show()
给出:
lapack_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
blas_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
lapack_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
blas_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['$HOME/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['$HOME/anaconda2/include']
None
就目前而言,这是 @brd490 as per the discussion in SciPy issue 8205 and is accepted by the Intel MKL team
友情报告的 MKL 错误请注意,OpenBLAS 构建的 SciPy 没有此问题。然而,与此同时,我们也注意到 scipy.linalg.eigh
中的最佳工作区数组大小不正确。一旦决定如何更改底层 [= 的签名,这也将得到纠正11=]/?HEEVR
包装。
作为奖励,可能人们能够有选择地计算特征值,因为最初这些例程允许这样做,但在 scipy.linalg.eigh
.