HPCG_for_Arm icon indicating copy to clipboard operation
HPCG_for_Arm copied to clipboard

Debug for SYMGS+SPMV fusion

Open xiaofengF opened this issue 3 years ago • 0 comments

Previous implementation of SYMGS+SPMV was using x_old to calculate the spmv (L * old_x + (D+U) * new_x), It was totally wrong due to the expression is equal to the value of source (i.e., b). The mathematical proof is that the backward induction is exact (U+D)x’’+Lx’=b.

It can also be proved by the applied code: ComputeSYMGS.cpp:764-768 totalContribution += xv[row] * currentDiagonal; while xv[row]=(rv[row] - totalContribution)/currentDiagonal, which gives totalContribution =rv[row]

Now we ensure all x are new, and we calculate Ax by (L+D+U)x = b-Lx_pre+Lx to reuse the data calculated in forward sweep.

xiaofengF avatar Dec 16 '22 08:12 xiaofengF