You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PanuaPardiso expect that the colptr and rowval are Int32. However, on many systems the KKT matrix will be saved as a SparseMatrixCSC{T, Int64} matrix instead of a SparseMatrixCSC{T, Int32} matrix. This mean that Pardiso.jl has to convert colptr and rowval to Int32 every time any functionality is called, leading to unnecessary computation and memory allocations. I think that this is not be an issue for MKLPardiso as here pardiso_64 should be called when LinearAlgebra.BlasInt = Int64, but have not been able to test this.
A simple fix could be to save Int32 copies of colptr and rowval in the ldlsolver and then call Panua directly using ccall. The downside is that the code would most likely require a split between Panua and MKL.
To highlight the issue I've attached timers for the current implementation and the possible fix below.
PanuaPardiso expect that the colptr and rowval are Int32. However, on many systems the KKT matrix will be saved as a
SparseMatrixCSC{T, Int64}
matrix instead of aSparseMatrixCSC{T, Int32}
matrix. This mean that Pardiso.jl has to convert colptr and rowval to Int32 every time any functionality is called, leading to unnecessary computation and memory allocations. I think that this is not be an issue for MKLPardiso as herepardiso_64
should be called when LinearAlgebra.BlasInt = Int64, but have not been able to test this.A simple fix could be to save Int32 copies of colptr and rowval in the
ldlsolver
and then call Panua directly usingccall
. The downside is that the code would most likely require a split between Panua and MKL.To highlight the issue I've attached
timers
for the current implementation and the possible fix below.Current
Saving colptr and rowval and calling Panua directly
The time difference is probably negligible for this small problem, but the allocation reduction is quite significant.
The text was updated successfully, but these errors were encountered: