<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 1, 2016 at 10:56 AM, Manav Bhatia <span dir="ltr"><<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Thanks. That means I am doing something goofy in setting up my matrix. </div><div><br></div><div>I am trying to create a matrix with block size 2, and 3000 as the number of block rows/columns. So, I would expect an output of 6000x6000 from the following code, but I get 3000x3000. Is it the sequence of my function calls? </div><div><br></div><div>Thanks,</div><div>Manav</div><div><br></div><div><br></div><div><br></div><div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    PetscErrorCode   ierr;</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    Mat              mat;</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco;min-height:14px"><div style="font-family:Helvetica;font-size:12px"><span style="font-family:Monaco;font-size:10px">    </span><span style="font-family:Monaco;font-size:10px">PetscInt</span><span style="font-family:Monaco;font-size:10px"> m,n;</span></div><div style="font-family:Helvetica;font-size:12px"><span style="font-family:Monaco;font-size:10px"><br></span></div><div style="font-family:Helvetica;font-size:12px"></div></div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    ierr = MatCreate(mpi_comm, &mat);    </div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    ierr = MatSetSizes(mat, 3000, 3000, 3000, 3000); </div></div></div></blockquote><div><br></div><div>MatSetSizes also takes the number of rows, not blocks.</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 style="word-wrap:break-word"><div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    ierr = MatSetType(mat, MATBAIJ);                 </div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    ierr = MatSetBlockSize(mat, 2);                  </div></div><div><span style="font-family:Monaco;font-size:10px">    </span><span style="font-family:Monaco;font-size:10px">ierr = </span><span style="font-family:Monaco;font-size:10px">MatGetSize</span><span style="font-family:Monaco;font-size:10px">(mat, &m, &n);</span></div><div><span style="font-family:Monaco;font-size:10px"><br></span></div><div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">    std::cout << m << "  " << n << std::endl;</div></div><div><br></div><div><br></div><br><div><blockquote type="cite"><div>On Mar 1, 2016, at 10:44 AM, Hong <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Manav:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
   Is MatGetSize for a SeqBAIJ matrix expected to return the number of block rows and columns, or the total number of rows and columns (blocks rows times block size)?<br></blockquote><div> </div><div>+  m - the number of global rows</div><div>-  n - the number of global columns</div><div>the total number of rows and columns (blocks rows times block size).<br></div><div><br></div><div>Hong</div></div><br></div></div>
</div></blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>