On Fri, Feb 5, 2010 at 6:17 PM, NovA <span dir="ltr"><<a href="mailto:av.nova@gmail.com">av.nova@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2010/2/6 Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>>:<br>
><br>
> On Feb 5, 2010, at 5:28 PM, NovA wrote:<br>
><br>
>> Thanks for the quick response!<br>
>><br>
>> 2010/2/6 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>>:<br>
>>><br>
>>> 1) It will distribute block rows, so you will get 8 and 4 as you want<br>
>><br>
>> How can it distribute in such a way, if it doesn't know block size yet?<br>
>> Let's continue the example:<br>
>> MatCreate(comm, &A);<br>
>> MatSetSizes(A, PETSC_DECIDE,12, 12,12);<br>
><br>
> ^^^^^^<br>
> This is wrong! Look at the manual page for<br>
> MatCreateMPIBAIJ() for information on the meaning of this.<br>
<br>
Sorry, but I can't find any additional info on this at<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateMPIBAIJ.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateMPIBAIJ.html</a><br>
and around. I could just expect that those sizes mean number of blocks<br>
not individual values, but can't find any confirmation...<br></blockquote><div><br>From the page: It says m,n,M,N are "rows" and the values in d_nz,o_nz are "blocks".<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>> MatSetType(A, MATMPIBAIJ);<br>
>> MatGetOwnershipRange(A, &rowS, &rowE);<br>
>> Then loop local rows from rowS/4 to rowE/4 to preallocate storage<br>
>> using MatMPIBAIJSetPreallocation(A,4,...)<br>
><br>
> You cannot do it this way. You cannot call MatGetOwnershipRange() before<br>
> setting the preallocation.<br>
<br>
Oh, ok. This applies to BAIJ, right? For AIJ this works, so I thought<br>
it should for BAIJ either.<br></blockquote><div><br>This is not correct for AIJ either.<br> <br> Matt<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
><br>
> You can either,<br>
><br>
> 1) figure out yourself the local sizes you want to use, then just call<br>
> MatCreateMPIBAIJ() with all the information (or call MatCreate(),<br>
> MatSetType(), MatSetSizes(), MatMPIBAIJSetPreallocation()) or<br>
> 2) Use PetscMap (see manual page for PetscMapInitialize) to see how PETSc<br>
> would decompose the rows and then use that information to do 1).<br>
<br>
Thanks for the tip. I'll try to sort it out.<br>
<br>
Best wishes,<br>
Andrey<br></blockquote></div><br>-- <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>