On Tue, Sep 4, 2012 at 9:52 AM, Thomas Witkowski <span dir="ltr"><<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <blockquote type="cite">
      <div class="gmail_quote"><br>
        <div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATNEST.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATNEST.html</a></div>
        <div><br>
        </div>
      </div>
    </blockquote>
    As I wrote in my initial question, each rank contains one and only
    one seqaij matrix, which all should be joined to one global matrix
    such that each local matrix is the corresponding diagonal block of
    the mpiaij matrix. I think, this does not work with nested matrices?<br></div></blockquote><div><br></div><div>Why does this not work? I really think you are making this harder than it has to be.</div><div><br></div>
<div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    Thomas<br>
    <br>
    <blockquote type="cite">
      <div class="gmail_quote">
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div text="#000000" bgcolor="#FFFFFF"><br>
            <blockquote type="cite">
              <div>Hong<br>
                <div class="gmail_quote">
                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div text="#000000" bgcolor="#FFFFFF">
                      <div>
                        <div>
                          <blockquote type="cite"> <br>
                            <div class="gmail_quote">Thomas :<br>
                              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In my
                                FETI-DP code, each rank creates a SEQAIJ
                                matrix that represents the
                                discretization of the interior domain.
                                Just for debugging, I would like to join
                                these sequential matrices to one global
                                MPIAIJ matrix. This matrix has no off
                                diagonal nnzs and should be stored
                                corresponding to the ranks unknowns,
                                thus, first all rows of the first rank
                                and so on. What's the most efficient way
                                to do this? Is it possible to create
                                this parallel matrix just as a view of
                                the sequential ones, so without copying
                                the data? Thanks for any advise.</blockquote>
                              <div><br>
                              </div>
                              <div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJConcatenateSeqAIJ.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJConcatenateSeqAIJ.html</a></div>

                              <div><br>
                              </div>
                              <div>Note: entries in seqaij matrices are
                                copied into a mpiaij matrix without</div>
                              <div>inter-processor communication. Use
                                petsc-3.3 for this function.</div>
                            </div>
                          </blockquote>
                          <br>
                        </div>
                      </div>
                      The function does not do what I expect. For
                      example, if we have two mpi task and each contains
                      one local square matrix with n rows, I want to
                      create a global square matrix with 2n rows. This
                      function create a non-square matrix of size 2n x
                      n.<span><font color="#888888"><br>
                          <br>
                          Thomas<br>
                        </font></span></div>
                  </blockquote>
                </div>
                <br>
              </div>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>