<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks. That means I am doing something goofy in setting up my matrix. </div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Thanks,</div><div class="">Manav</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> PetscErrorCode ierr;</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> Mat mat;</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; min-height: 14px;" class=""><div style="font-family: Helvetica; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 10px;" class=""> </span><span style="font-family: Monaco; font-size: 10px;" class="">PetscInt</span><span style="font-family: Monaco; font-size: 10px;" class=""> m,n;</span></div><div style="font-family: Helvetica; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 10px;" class=""><br class=""></span></div><div style="font-family: Helvetica; font-size: 12px;" class=""></div></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> ierr = MatCreate(mpi_comm, &mat); </div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> ierr = MatSetSizes(mat, 3000, 3000, 3000, 3000); </div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> ierr = MatSetType(mat, MATBAIJ); </div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> ierr = MatSetBlockSize(mat, 2); </div></div><div class=""><span style="font-family: Monaco; font-size: 10px;" class=""> </span><span style="font-family: Monaco; font-size: 10px;" class="">ierr = </span><span style="font-family: Monaco; font-size: 10px;" class="">MatGetSize</span><span style="font-family: Monaco; font-size: 10px;" class="">(mat, &m, &n);</span></div><div class=""><span style="font-family: Monaco; font-size: 10px;" class=""><br class=""></span></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""> std::cout << m << " " << n << std::endl;</div></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 1, 2016, at 10:44 AM, Hong <<a href="mailto:hzhang@mcs.anl.gov" class="">hzhang@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><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 class=""></blockquote><div class=""> </div><div class="">+ m - the number of global rows</div><div class="">- n - the number of global columns</div><div class="">the total number of rows and columns (blocks rows times block size).<br class=""></div><div class=""><br class=""></div><div class="">Hong</div></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>