<br><br><b><i>Lisandro Dalcin &lt;dalcinl@gmail.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On 5/20/08, Waad Subber <w_subber@yahoo.com> wrote:<br>&gt; The system I am trying to solve is the interface problem in iterative<br>&gt; substructuring DDM. Where A_i represents [R_i^T*S_i*R_i] and f_i is<br>&gt; [R_i^T*g_i].<br>&gt;<br>&gt; Each process  constructs the local Schur complement matrix (S_i) , the<br>&gt; restriction matrix(R_i) as SeqAIJ and the RHS vector (g_i) as a sequential<br>&gt; vector.<br><br>Two questions:<br><br>1) How do you actually get the local Schur complements. You<br>explicitelly compute its entries, or do you compute it after computing<br>the inverse (or LU factors) of a 'local' matrix?<br><br>I construct the local Schur complement matrices after getting the inversion of A_II matrix for each subdomain.<br><br>2) Your R_i matrix is actually a matrix? In that
 case, it is a trivial<br>restrinction operation with ones and zeros? Or R_i is actually a<br>VecScatter?<br><br>R_i is the restriction matrix maps the global boundary nodes to the local boundary nodes and its entries is zero and one I store it as spare matrix, so only I need to store the nonzero entries which one entry per a row<br><br>And finally: are you trying to apply a Krylov method over the global<br>Schur complement? In such a case, are you going to implement a<br>preconditioner for it?<br><br>Yes, that what I am trying to do<br><br><br>&gt; Now having the Schur complement matrix for each subdomain, I need to solve<br>&gt; the interface problem (Sum[R_i^T*S_i*R_i])u=Sum[R_i^T*g_i],<br>&gt; .. i=1.. to No. of process (subdomains) in parallel.<br>&gt;<br>&gt; For the global vector I construct one MPI vector and use VecGetArray ()  for<br>&gt; each of the sequential vector then use  VecSetValues () to add the values<br>&gt; into the global MPI vector. That works
 fine.<br>&gt;<br>&gt; However for the global schur complement matix I try the same idea by<br>&gt; creating one parallel MPIAIJ matrix and using MatGetArray( ) and<br>&gt; MatSetValues () in order to add the values to the global matrix.<br>&gt; MatGetArray( ) gives me only the values without indices, so I don't know how<br>&gt; to add these valuse to the global MPI matrix.<br>&gt;<br>&gt; Thanks agin<br>&gt;<br>&gt; Waad<br>&gt;<br>&gt; Barry Smith <bsmith@mcs.anl.gov> wrote:<br>&gt;<br>&gt; On May 20, 2008, at 3:16 PM, Waad Subber wrote:<br>&gt;<br>&gt; &gt; Thank you Matt,<br>&gt; &gt;<br>&gt; &gt; Any suggestion to solve the problem I am trying to tackle. I want to<br>&gt; &gt; solve a linear system:<br>&gt; &gt;<br>&gt; &gt; Sum(A_i) u= Sum(f_i) , i=1.... to No. of CPUs.<br>&gt; &gt;<br>&gt; &gt; Where A_i is a sparse sequential matrix and f_i is a sequential<br>&gt; &gt; vector. Each CPU has one matrix and one vector of the same size. Now<br>&gt; &gt; I want to sum up
 and solve the system in parallel.<br>&gt;<br>&gt;  Does each A_i have nonzero entries (mostly) associated with one<br>&gt; part of the matrix? Or does each process have values<br>&gt; scattered all around the matrix?<br>&gt;<br>&gt;  In the former case you should simply create one parallel MPIAIJ<br>&gt; matrix and call MatSetValues() to put the values<br>&gt; into it. We don't have any kind of support for the later case, perhaps<br>&gt; if you describe how the matrix entries come about someone<br>&gt; would have suggestions on how to proceed.<br>&gt;<br>&gt;  Barry<br>&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Thanks again<br>&gt; &gt;<br>&gt; &gt; Waad<br>&gt; &gt;<br>&gt; &gt; Matthew Knepley wrote: On Tue, May 20, 2008 at<br>&gt; &gt; 2:12 PM, Waad Subber wrote:<br>&gt; &gt; &gt; Hi,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I am trying to construct a sparse parallel matrix (MPIAIJ) by<br>&gt; &gt; adding up<br>&gt; &gt; &gt; sparse sequential matrices (SeqAIJ) from each
 CPU. I am using<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; MatMerge_SeqsToMPI(MPI_Comm comm,Mat seqmat,PetscInt m,PetscInt<br>&gt; &gt; n,MatReuse<br>&gt; &gt; &gt; scall,Mat *mpimat)<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; to do that. However, when I compile the code I get the following<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; undefined reference to `matmerge_seqstompi_'<br>&gt; &gt; &gt; collect2: ld returned 1 exit status<br>&gt; &gt; &gt; make: *** [all] Error 1<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Am I using this function correctly ?<br>&gt; &gt;<br>&gt; &gt; These have no Fortran bindings right now.<br>&gt; &gt;<br>&gt; &gt; Matt<br>&gt; &gt;<br>&gt; &gt; &gt; Thanks<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Waad<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; What most experimenters take for granted before they begin their<br>&gt; &gt; experiments is infinitely more interesting than any results to which<br>&gt; &gt; their experiments lead.<br>&gt;
 &gt; -- Norbert Wiener<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br><br><br>-- <br>Lisandro Dalcín<br>---------------<br>Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)<br>Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)<br>Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)<br>PTLC - Güemes 3450, (3000) Santa Fe, Argentina<br>Tel/Fax: +54-(0)342-451.1594<br><br></bsmith@mcs.anl.gov></w_subber@yahoo.com></blockquote><br><p>&#32;