On page 18 of SuperLU's user guide, the following sample input matrix A is given:


U matrix is given as follow in the user guide:


But dgssv() produces the following matrix, which is printed via dPrint_CompCol_Matrix("U", U)

CompCol matrix U:
Stype 0, Dtype 1, Mtype 4
nrow 5, ncol 5, nnz 11
nzval: 21.000000  -13.263158  7.578947  21.000000  
rowind: 0  1  2  0  
colptr: 0  0  0  1  4  4

The U matrix given in the user guide is correct (you can verify it at this link). I wonder why SuperLU produces such a matrix. How can I generate correct U matrix from the SuperLU output?

P.S. For ordering columns of A, I have used my permutation vector, which is 1,2,3,4,5. In other words, there is no reordering for columns. Rows of A are not reordered by SuperLU.


1 Answer 1


I have found out that the missing nonzeros are stored in L matrix. Storage type of L is supernodel to speedup the factorization process via utilizing dense blocks. So some nonzeros of U matrix is stored in L matrix.

  • $\begingroup$ Welcome to SciComp. No problem in answering your own questions, but for the sake of clarity for future visitors of the site, could you please write a more pedagogic answer? Thanks. $\endgroup$
    – GertVdE
    Commented Jul 8, 2013 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.