{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12664","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12664/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12664/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12664/events","html_url":"https://github.com/JuliaLang/julia/issues/12664","id":101470479,"number":12664,"title":"Sparse Matrix Solve Index Type","user":{"login":"JaredCrean2","id":10292902,"avatar_url":"https://avatars.githubusercontent.com/u/10292902?v=3","gravatar_id":"","url":"https://api.github.com/users/JaredCrean2","html_url":"https://github.com/JaredCrean2","followers_url":"https://api.github.com/users/JaredCrean2/followers","following_url":"https://api.github.com/users/JaredCrean2/following{/other_user}","gists_url":"https://api.github.com/users/JaredCrean2/gists{/gist_id}","starred_url":"https://api.github.com/users/JaredCrean2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaredCrean2/subscriptions","organizations_url":"https://api.github.com/users/JaredCrean2/orgs","repos_url":"https://api.github.com/users/JaredCrean2/repos","events_url":"https://api.github.com/users/JaredCrean2/events{/privacy}","received_events_url":"https://api.github.com/users/JaredCrean2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/sparse","name":"sparse","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-08-17T17:33:04Z","updated_at":"2015-10-12T23:30:58Z","closed_at":null,"body":"It looks like there has been a regression with sparse matrix solves.  A `SparseMatrixCSC{Float64, Int64}` works, but `SparseMatrixCSC{Float64, Int32}` doen't anymore.\r\n\r\nHere is little example I cooked up:\r\n```julia\r\nm = n = 3\r\na = rand(m,n)\r\nb = sparse(a)\r\nrhs = rand(m)\r\n\r\n\r\ncolptr_small = zeros(Int32, length(b.colptr))\r\nrowval_small = zeros(Int32, length(b.rowval))\r\n\r\n# convert to Int32 indices\r\n# is there a better syntax/function for doing this?\r\nfor i=1:length(b.colptr)\r\n  colptr_small[i] = b.colptr[i]\r\nend\r\n\r\nfor i=1:length(b.rowval)\r\n  rowval_small[i] = b.rowval[i]\r\nend\r\n\r\nc = SparseMatrixCSC(m, n, colptr_small, rowval_small, b.nzval)\r\n\r\nx1 = a\\rhs\r\nprintln(\"x1 = \", x1)\r\nx2 = b\\rhs\r\nprintln(\"x2 = \", x2)\r\nx3 = c\\rhs   # error\r\nprintln(\"x3 = \", x3)\r\n```\r\n\r\nThe error is:\r\n\r\n```\r\nERROR: LoadError: MethodError: `convert` has no method matching convert(::Type{Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Float64,Complex{Float64}}}}, ::Base.SparseMatrix.SparseMatrixCSC{Float64,Int32})\r\nThis may have arisen from a call to the constructor Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Float64,Complex{Float64}}}(...),\r\nsince type constructors fall back to convert methods.\r\nClosest candidates are:\r\n  call{T}(::Type{T}, ::Any)\r\n  convert{T}(::Type{T}, !Matched::T)\r\n  Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Float64,Complex{Float64}}}(!Matched::Ptr{Base.SparseMatrix.CHOLMOD.C_Sparse{Tv<:Union{Float64,Complex{Float64}}}})\r\n  ...\r\n in factorize at sparse/linalg.jl:642\r\n in \\ at linalg/generic.jl:314\r\n in include at ./boot.jl:254\r\n in include_from_node1 at ./loading.jl:187\r\n in process_options at ./client.jl:308\r\n in _start at ./client.jl:411\r\nwhile loading /home/jared/repos/julia_tests/colptr/main.jl, in expression starting on line 24\r\n```\r\n\r\nIt worked with:\r\n```\r\nJulia Version 0.4.0-dev+5149\r\nCommit 317a4d1* (2015-06-01 18:58 UTC)\r\nPlatform Info:\r\n  System: Linux (x86_64-linux-gnu)\r\n  CPU: Intel(R) Core(TM) i7 CPU       Q 820  @ 1.73GHz\r\n  WORD_SIZE: 64\r\n  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)\r\n  LAPACK: libopenblas\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-3.3\r\n```\r\n\r\nBut does not with:\r\n```\r\nJulia Version 0.4.0-dev+6095\r\nCommit c75f4d4* (2015-07-20 14:38 UTC)\r\nPlatform Info:\r\n  System: Linux (x86_64-linux-gnu)\r\n  CPU: Intel(R) Core(TM) i7 CPU       Q 820  @ 1.73GHz\r\n  WORD_SIZE: 64\r\n  BLAS: libopenblas (NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Nehalem)\r\n  LAPACK: liblapack.so.3\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-3.3\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/147548562","html_url":"https://github.com/JuliaLang/julia/issues/12664#issuecomment-147548562","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12664","id":147548562,"user":{"login":"JaredCrean2","id":10292902,"avatar_url":"https://avatars.githubusercontent.com/u/10292902?v=3","gravatar_id":"","url":"https://api.github.com/users/JaredCrean2","html_url":"https://github.com/JaredCrean2","followers_url":"https://api.github.com/users/JaredCrean2/followers","following_url":"https://api.github.com/users/JaredCrean2/following{/other_user}","gists_url":"https://api.github.com/users/JaredCrean2/gists{/gist_id}","starred_url":"https://api.github.com/users/JaredCrean2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaredCrean2/subscriptions","organizations_url":"https://api.github.com/users/JaredCrean2/orgs","repos_url":"https://api.github.com/users/JaredCrean2/repos","events_url":"https://api.github.com/users/JaredCrean2/events{/privacy}","received_events_url":"https://api.github.com/users/JaredCrean2/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T23:30:58Z","updated_at":"2015-10-12T23:30:58Z","body":"For PETSc we ended up building 3 versions of the library to support the different data types.  Could we do something similar for SuiteSparse?  That would allow us to have 2 SuiteSparse sessions for the different integer types?"}}