Serving the Quantitative Finance Community

 
User avatar
Dcole
Topic Author
Posts: 0
Joined: December 15th, 2009, 8:30 pm

Residual in 3D Gauss Seidel

April 5th, 2010, 6:53 pm

Greetings all,As some of you have seen in my previous post, I have been working on a 3D Gauss Seidel solver for quite some time. I have managed to parallelize the solver finally after getting all of the memory issues in the code worked out. However, there is one slight problem. I think that the residual calculation is not working across the many processors. When I run the code with MPI, and only on one processor, I get the correct answer. Any more than that, and the solution starts to get more and more off. Well, I think. Since my code is calculation potential in an e-field (sorry, not finance related , would you expect that potential to reach some "steady-state" faster the more processors I throw at it? Thats the only thing I can think of for this code. The residual calculation also looks funny (i didnt write it), but it appears to be calculated using the distances to the neighbors for each point (its a non uniform mesh), summing those all together, dividing by some other stuff, and then squaring that answer. I am not really sure how a residual of a 3D problem should be calculated. I thought it would simply be the sum of the neighbors, divided by the product of the distances to each one, and take the square root of that. I don't recognize anything like that in this residual calculation.Regardless of all that has been said above, the original code (which had previously had feeble attempts at parallelizing) had the last thing to happen was an MPI_Allreduce to find the Maximum of each of the processors residuals, and set that as the residual for them all. This seems kind of bogus to me, and I would've thought it would really have been a sum operation. Any thoughts?
 
User avatar
endian675
Posts: 0
Joined: March 11th, 2008, 7:09 pm

Residual in 3D Gauss Seidel

April 6th, 2010, 3:13 pm