MatMatMult

Barry Smith bsmith at mcs.anl.gov
Sun Apr 20 12:59:29 CDT 2008


   Waad,

    There is no way to compute this in advance. Use PETSC_DEFAULT to  
use the default estimate.
You can run the program with -info and search for "Fill ratio" this  
will give you needed value which will
give you an idea of what to use in the future.

   I have added this info to the manual page.

    Barry

Note that the needed ratio does depend on the matrix size so you may  
need to adjust the value for
larger matrices.

On Apr 20, 2008, at 11:43 AM, Waad Subber wrote:

> Hi
>
> I want to multiply two sparse sequential matrices. In order to do  
> that I think I should use MatMatMult ; however,  I need the expected  
> fill ratio which I don't know in advance.
>
> For matrix A and matrix B I might get the nnz(A) and nnz(B) from  
> MatGetInfo. What about nnz(C) ?
>
> Thanks
>
> Waad
>
>
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  
> Try it now.




More information about the petsc-users mailing list