I'm trying to solve a least-squares problem using sparse QR, but:

julia> size(A)
(3140,1988)

julia> nnz(A)
8510

julia> size(b)
(3140,)

julia> typeof(A)
SparseMatrixCSC{Float64,Int64}

julia> A \ b
ERROR: Base.SparseMatrix.CHOLMOD.CHOLMODException("")
 in convert at sparse/cholmod.jl:867
 in factorize at sparse/linalg.jl:854
 in \ at linalg/generic.jl:326


The matrix A is rank deficient, but I don't think that's the source of the 
problem. I get the same exception if I regularize the problem.

This is with Julia 0.4.6. The relevant portion of sparse/cholmod.jl is:

 
856 function convert{Tv<:VTypes}(::Type{Sparse}, A::SparseMatrixCSC{Tv,
SuiteSparse_long}, stype::Integer)
 857     o = allocate_sparse(A.m, A.n, length(A.nzval), true, true, stype, 
Tv)
 858     s = unsafe_load(o.p)
 859     for i = 1:length(A.colptr)
 860         unsafe_store!(s.p, A.colptr[i] - 1, i)
 861     end
 862     for i = 1:length(A.rowval)
 863         unsafe_store!(s.i, A.rowval[i] - 1, i)
 864     end
 865     unsafe_copy!(s.x, pointer(A.nzval), length(A.nzval))
 866
 867     @isok check_sparse(o)
 868
 869     return o
 870 end


How can I find out more about what's gone wrong?

Reply via email to