Thank you Matt and Barry,<br><br>The system I am trying to solve is the interface problem in iterative substructuring DDM. Where A_i represents [R_i^T*S_i*R_i] and f_i is [R_i^T*g_i].<br><br>Each process constructs the local Schur complement matrix (S_i) , the restriction matrix(R_i) as SeqAIJ and the RHS vector (g_i) as a sequential vector.<br><br>Now having the Schur complement matrix for each subdomain, I need to solve the interface problem (Sum[R_i^T*S_i*R_i])u=Sum[R_i^T*g_i], .. i=1.. to No. of process (subdomains) in parallel. <br><br>For the global vector I construct one MPI vector and use VecGetArray () for each of the sequential vector then use VecSetValues () to add the values into the global MPI vector. That works fine.<br><br>However for the global schur complement matix I try the same idea by creating one parallel MPIAIJ matrix and using MatGetArray( ) and MatSetValues () in order to add the values to the global matrix. MatGetArray( ) gives me
only the values without indices, so I don't know how to add these valuse to the global MPI matrix.<br><br>Thanks agin<br><br>Waad<br><br><b><i>Barry Smith <bsmith@mcs.anl.gov></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>On May 20, 2008, at 3:16 PM, Waad Subber wrote:<br><br>> Thank you Matt,<br>><br>> Any suggestion to solve the problem I am trying to tackle. I want to <br>> solve a linear system:<br>><br>> Sum(A_i) u= Sum(f_i) , i=1.... to No. of CPUs.<br>><br>> Where A_i is a sparse sequential matrix and f_i is a sequential <br>> vector. Each CPU has one matrix and one vector of the same size. Now <br>> I want to sum up and solve the system in parallel.<br><br> Does each A_i have nonzero entries (mostly) associated with one <br>part of the matrix? Or does each process have values<br>scattered all around the matrix?<br><br> In the former
case you should simply create one parallel MPIAIJ <br>matrix and call MatSetValues() to put the values<br>into it. We don't have any kind of support for the later case, perhaps <br>if you describe how the matrix entries come about someone<br>would have suggestions on how to proceed.<br><br> Barry<br><br>><br>><br>> Thanks again<br>><br>> Waad<br>><br>> Matthew Knepley <knepley@gmail.com> wrote: On Tue, May 20, 2008 at <br>> 2:12 PM, Waad Subber wrote:<br>> > Hi,<br>> ><br>> > I am trying to construct a sparse parallel matrix (MPIAIJ) by <br>> adding up<br>> > sparse sequential matrices (SeqAIJ) from each CPU. I am using<br>> ><br>> > MatMerge_SeqsToMPI(MPI_Comm comm,Mat seqmat,PetscInt m,PetscInt <br>> n,MatReuse<br>> > scall,Mat *mpimat)<br>> ><br>> > to do that. However, when I compile the code I get the following<br>> ><br>> > undefined reference to
`matmerge_seqstompi_'<br>> > collect2: ld returned 1 exit status<br>> > make: *** [all] Error 1<br>> ><br>> > Am I using this function correctly ?<br>><br>> These have no Fortran bindings right now.<br>><br>> Matt<br>><br>> > Thanks<br>> ><br>> > Waad<br>> ><br>><br>><br>><br>> -- <br>> What most experimenters take for granted before they begin their<br>> experiments is infinitely more interesting than any results to which<br>> their experiments lead.<br>> -- Norbert Wiener<br>><br>><br>><br><br></knepley@gmail.com></blockquote><br><p>