![]() |
|
#1
|
|||
|
|||
MPI - linear pipeline solution for jacobi iterationhello
i have a problem on how to write 2 parallel code by using MPI programming with c/c++ to solve a system of linear equation by using jacobi and gauss-seidel iteration method. and it is using pipelining. here is sample code of an equation solve by using pipeline: F = a0x0 + a1x1 + a2x2 …….+ k + an-1xn-1 CPP / C++ / C Code:
so how can i modified this code so that i can do the pipeline jacobi iteration and pipeline gauss-seidel iteration assuming the equation is like a11x1 + a12x2 + … + a1nxn = b1; a21x1 + a22x2 + … + a2nxn = b2; . . . . . . an1x1 + an2x2 + … + annxn = bn for the jacobi iteration : suppose that one process is allocated for each unknown ( p=n) and each process iterate the same number of time.on each iteration the newly computed values of the unknow will need to be broadcast to all other process. the parallel algorithm should be like this CPP / C++ / C Code:
an alternative simple solution is to return to basic send() and recv() , for broadcast_receive(); that is process i might have: CPP / C++ / C Code:
i need to modify this sequential code for gauss-seidel so that in can be done in parallel CPP / C++ / C Code:
The master process (rank 0) accepts the size of the system and reads the coefficients a’s and b’s. Then, it will distribute them to the corresponding slave processes. The master process should collect the final solution from the slave processes and display i wish if there is a solution for this problem Last edited by LuciWiz : 03-May-2006 at 05:15.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|||
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The