Home > Research > NB Collectives > CG Solver  
Home Events Past Events 
An Example: 3D Poisson CG Solver This code uses a conjugate gradient based method to solve a poisson equation in 3dimensional space. A first version using blocking collective communication was written in collaboration with Peter Gottschling. We added support for nonblocking collective operations with the NBC library by changing only two lines in the source code. The parallel code uses a standard domain decomposition technique to distribute a discretized 3D space among the processes. The corresponding threedimensional process grid is built with MPI_Cart_create. Within each iteration, a matrix vector product takes a significant fraction of the execution time which can be accelerated by nonblocking communication. Each process performs three main steps in the calculation:
Step 1 is independent of all others, which allows to perform this task between step 2 and 3. The nonblocking implementation issues the nonblocking Alltoallv as first operation, calculates the inner part, waits for the Alltoallv to complete and calculates the outer part. A detailed description and benchmark results are available in "Optimizing a Conjugate Gradient Solver with NonBlocking Collective Operations" [1]. The timed source code is available: CG Solver Source Code (prerelease)  (23.89 kb)References

serving: 3.239.56.184:44944  © Torsten Hoefler 