Page 1 of 1

Number of iterations error

PostPosted: Fri Mar 23, 2012 2:27 am
by phoebe
I made a little modification to iterativeSystemSolve.c, which is attached and the name is iterativeSystemSolveTest.c. The new version, iterativeSystemSolveTest.c is to solve a linear system of equations with 3 variables. The coefficient matrix A is an identity matrix, the right- hand side vector is [0, 1, 2]T. So the solution to this linear system of equations should be [0, 1, 2]T. To test the number of iterations, the initial guess is set as the solution, that is [0, 1, 2]T. I think the number of iterations should be 1, but the result given by iterativeSystemSolveTest.c is 2. The operating system I used is linux, CUDA version installed is 4.1, GPU model is Tesla C1060.
So do I have the wrong expectation? The number of the iterations in this example should be 2? I would be appreciated if someone can tell me the answer. Thanks!