Skip to content

Bug: KLU does not work on non-symmetric matrices #321

@shakedregev

Description

@shakedregev

Description how to reproduce the bug

Many of our solvers use KLU in the first iteration, which assumes CSC storage. However, our data is coming in in CSR, and the solvers themselves also use CSR. This means that unless the matrices are symmetric, we should not expect the solvers to work as is.

gpuRefactor and kluRefactor produce large residuals.

This will reproduce the result on Frontier as is, if run from the build directory of ReSolve (the matrices are already there).

nohup ./examples/gpuRefactor.exe -m /ccs/proj/eng151/jacobian_residual_1k/ScaleMicrogrid_Jacobian_N1000_ -r /ccs/proj/eng151/jacobian_residual_1k/ScaleMicrogrid_Residual_N1000_ -n 92 -b hip >> gpuRefactor_results.txt

Replace gpuRefactor with kluRefactor to see other errors.

I've started to address this already, so work with me if you want to contribute.

Re::Solve version

develop

System and environment details

All backends

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions