<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Matt,<br>
    <br>
    Here are matrices (double complex, 3 MB each):<br>
    <a class="moz-txt-link-freetext" href="http://dl.dropbox.com/u/60982984/X.dat">http://dl.dropbox.com/u/60982984/X.dat</a><br>
    <a class="moz-txt-link-freetext" href="http://dl.dropbox.com/u/60982984/Y.dat">http://dl.dropbox.com/u/60982984/Y.dat</a><br>
    <br>
    Code:<br>
    <br>
    static char help[] = "";<br>
    int main(int argc,char **args)<br>
    {<br>
      Mat            A,B;<br>
      PetscErrorCode ierr;<br>
      PetscViewer    viewer;<br>
      PetscScalar    cone;<br>
    <br>
      PetscInitialize(&argc,&args,(char *)0,help);<br>
    <br>
      ierr =
PetscViewerBinaryOpen(PETSC_COMM_WORLD,"Y.dat",FILE_MODE_READ,&viewer);CHKERRQ(ierr);<br>
      ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr);<br>
      ierr = MatSetFromOptions(A);CHKERRQ(ierr);<br>
      ierr = MatLoad(A,viewer);CHKERRQ(ierr);<br>
      ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);<br>
    <br>
      ierr =
PetscViewerBinaryOpen(PETSC_COMM_WORLD,"X.dat",FILE_MODE_READ,&viewer);CHKERRQ(ierr);<br>
      ierr = MatCreate(PETSC_COMM_WORLD,&B);CHKERRQ(ierr);<br>
      ierr = MatSetFromOptions(B);CHKERRQ(ierr);<br>
      ierr = MatLoad(B,viewer);CHKERRQ(ierr);<br>
      ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);<br>
      <br>
      cone = 1.0;<br>
      ierr = MatAYPX(A,cone,B,DIFFERENT_NONZERO_PATTERN);<br>
      ierr = PetscFinalize();<br>
      return 0;<br>
    }<br>
    <br>
    It works fine if you run it with:<br>
    mpirun -n 10 solveTest -mat_type aij<br>
    <br>
    and crashes if n > 10<br>
    <br>
    Thanks.<br>
    <br>
    On 22.04.2012 14:51, Matthew Knepley wrote:
    <blockquote
cite="mid:CAMYG4GndtUuF7Yn3n-Jsoc=-kP-v_QpFuoAyxhfQrrYkKeNf-g@mail.gmail.com"
      type="cite">On Sun, Apr 22, 2012 at 8:41 AM, Alexander Grayver <span
        dir="ltr"><<a moz-do-not-send="true"
          href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span>
      wrote:<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> Sorry, I don't quite
            get. Is this something I can avoid by doing preallocation
            properly or petsc issue that will be fixed? </div>
        </blockquote>
        <div><br>
        </div>
        <div>This looks like a PETSc bug to me, but it would be nice to
          get input that triggers it.</div>
        <div><br>
        </div>
        <div>  Thanks,</div>
        <div><br>
        </div>
        <div>     Matt</div>
        <div> </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000">
            <div>
              <div class="h5"> On 20.04.2012 14:23, Jed Brown wrote:
                <blockquote type="cite">
                  <div class="gmail_quote">On Fri, Apr 20, 2012 at
                    05:18, Matthew Knepley <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin: 0pt
                      0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                      204, 204); padding-left: 1ex;">
                      <div>Did someone intend to fix this, and then
                        stop? MatAXPY_BasicWithPreallocation() is the
                        same as MatAXPY_Basic().</div>
                    </blockquote>
                  </div>
                  <div><br>
                  </div>
                  <div>Look how it's called. I don't know what's going
                    on here.</div>
                  <div><br>
                  </div>
                  <div>    ierr =
                    MatAXPYGetPreallocation_SeqAIJ(yy->A,xx->A,nnz_d);CHKERRQ(ierr);</div>
                  <div>    ierr =
                    MatAXPYGetPreallocation_SeqAIJ(yy->B,xx->B,nnz_o);CHKERRQ(ierr);</div>
                  <div>    ierr =
                    MatMPIAIJSetPreallocation(B,0,nnz_d,0,nnz_o);CHKERRQ(ierr);</div>
                  <div>    ierr =
                    MatAXPY_BasicWithPreallocation(B,Y,a,X,str);CHKERRQ(ierr);</div>
                  <div><br>
                  </div>
                </blockquote>
                <br>
                <br>
              </div>
            </div>
            <span class="HOEnZb"><font color="#888888">
                <pre cols="72">-- 
Regards,
Alexander</pre>
              </font></span></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>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Regards,
Alexander</pre>
  </body>
</html>