Armadillo c ++:使用行列式崩溃

时间:2015-08-03 09:35:26

标签: c++ armadillo

我正在使用动态链接的openblas的armadillo(mingw 4.9.2r1 64bits)。犰狳工作正常。

当我使用"标准"来调用行列式函数时,它会崩溃算法。 因为我想用> 4x4矩阵,我需要这个算法。

这是一个简单的例子:

mat    A(2,2);
A(0,0) = 2; A(0,1) = 1;
A(1,0) = -1; A(1,1) = 3;

double x = arma::det(A, 'std');

这是回溯:

#0  0x000000001230c5a0 in dgetf2_k () from libopenblas.dll
#1  0x0000000012308080 in dgetrf_parallel () from libopenblas.dll
#2  0x00000000120c879c in dgetrf_ () from libopenblas.dll
#3  0x0000000000411178 in arma::lapack::getrf<double> (m=0x22f798, n=0x22f794, a=0x22f710, lda=0x22f798, ipiv=0x22f6a0, info=0x22f79c) at include/armadillo_bits/lapack_wrapper.hpp:37
#4  0x000000000040f0ee in arma::auxlib::det_lapack<double> (X=..., make_copy=121) at include/armadillo_bits/auxlib_meat.hpp:665
        ipiv = {n_elem = 2, mem = 0x22f6a0, mem_local = {1, 0, 2, 0, 2291440, 0, 4279265, 0, 368698416, 0, 156489501, 0, 2291440, 0, 368225296, 0}}
        info = 1
        n_rows = 184120786
        n_cols = 2
        val = 1.1329597188418127e-317
        sign = 0
        X_copy = {<arma::Base<double, arma::Mat<double> >> = {<arma::Base_inv_yes<arma::Mat<double> >> = {<No data fields>}, <arma::Base_eval_Mat<double, arma::Mat<double> >> = {<No data fields>}, <arma::Base_trans_default<arma::Mat<double> >> = {<No data fields>}, <No data fields>}, n_rows = 2, n_cols = 2, n_elem = 4, vec_state = 0, mem_state = 0, mem = 0x22f710, mem_local = {2, -0.5, 1, 3.5, 1.1321929289594671e-317, 1.6982893934392007e-317, 2.120860281867698e-317, 1.0604298939010261e-317, 2.1219957904712067e-314, 1.2429334036021495e-314, 1.8216095224997325e-315, 2.7324190663050505e-315, 2.1188538812799367e-317, 1.8299493506015327e-315, 1.8216122102168459e-315, 7.8786860431775733e-313}, static is_col = <optimized out>, static is_row = <optimized out>}
        tmp = @0x347250: {<arma::Base<double, arma::Mat<double> >> = {<arma::Base_inv_yes<arma::Mat<double> >> = {<No data fields>}, <arma::Base_eval_Mat<double, arma::Mat<double> >> = {<No data fields>}, <arma::Base_trans_default<arma::Mat<double> >> = {<No data fields>}, <No data fields>}, n_rows = 18369900232523579118, n_cols = 18369900232523579118, n_elem = 18369900232523579118, vec_state = 4277075694, mem_state = 4277075694, mem = 0xfeeefeeefeeefeee, mem_local = {-2.6569842580370804e+303 <repeats 16 times>}, static is_col = <optimized out>, static is_row = <optimized out>}
#5  0x0000000000528d13 in ?? ()

感谢您的任何想法。

0 个答案:

没有答案