Description
Description how to reproduce the bug
Replace the matrix path with yours. (Matrices are on Frontier at /ccs/proj/eng151
)
./examples/gluRefactor.exe -m ../jacobian_residual_1k/ScaleMicrogrid_Jacobian_N1000_ -r ../jacobian_residual_1k/ScaleMicrogrid_Residual_N1000_ -n 92 -b cuda
I think the most likely problem is that CSC and CSR representation are switched between. The input is in CSR, klu assumes CSC, then glu again assumes CSR. One or both of these assumptions is the likely culprit.
I suggest reworking extractLFactor
and extractUFactor
so they produce CSR matrices to begin with. This will require passing U as the first argument and L as the second to klu_extract_factors
.
The math works out with CSC that it's equivalent to just assuming the CSC factors you got are CSR, and switching them. The scaling will be in L, instead of U. So the rest of the code must reflect that.
We will also need to redo combineFactors
to work with CSR representation and assume the scaling is in L.
Re::Solve version
develop, shaked/assymetric_klu_fix
System and environment details
CUDA
Additional information
No response