[petsc-users] MatMPIBAIJSetPreallocationCSR i and j indices

Barry Smith bsmith at mcs.anl.gov
Sun Sep 29 12:30:51 CDT 2013

  Fixed and accidentally pushed directly to maint at bitbucket

On Sep 29, 2013, at 11:22 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:

> On 29 September 2013 17:31, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>   I forgot that MatSetValuesBlocked() takes row oriented input even within the blocks. So if we simply call MatSetOption(mat,MAT_ROW_ORIENTED,PETSC_FALSE) on the matrix after it is created then the storage should work as I originally planned.
>>  Barry
>> I found this discussion values(bs,nblockcols,bs,nblockrows)  very confusing. MatMPIBAIJSetPreallocationCSR() doesn't take a square block of values so I didn't see what you are talking about. You must be talking about each internal call to MatSetValuesBlocked_MPIBAIJ(B,1,&row,ncols,icols,svals,INSERT_VALUES) where it puts in one block row of values with each call.
> Yes, that's what I was talking about. And yes, if you have
> column-oriented block values [e.g, in fotran you use an array
> VALUES(bs,bs,nnz) ] and use MatSetOption(), you are fine and
> MatMPIBAIJSetPreallocationCSR() will do the right thing. Otherwise
> (e.g, you are in C and use VALUES[nnz][bs][bs]), feeding
> MatMPIBAIJSetPreallocationCSR() with these values will not work. I
> guess we have to live with that.
> -- 
> Lisandro Dalcin
> ---------------
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1016)
> Tel/Fax: +54-342-4511169

More information about the petsc-users mailing list