Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Problem in MKL example for CG with SSOR

Tysseer_H_
Beginner
252 Views

I think there is something wrong with the sample "cg_ssor_precon_c.c" in the for loop that applies the SSOR iteration. The purpose of the loop is to apply SSOR repeatedly on the array &tmp[3*n]. but inside the loop every time it starts using tmp[2*n] and overwrites the previous value in tmp[3*n]. So effectively the loop is equivalent to a single SSOR run regardless of the number of iterations desired.

Can somebody help me confirm this?

0 Kudos
1 Reply
Jing_Xu
Employee
252 Views

Do you mean snippet from line 208 to line 228 in the c file?

tmp[3*n] will be updated in the function call mkl_dcsrsv (line 225).

In the function call mkl_dcsrmv (line 221), tmp[3*n] is used as input, so in each iteration, tmp[3*n] will be updated and the inputs to mkl_dcsrmv are different.

0 Kudos
Reply