[petsc-users] some beginner questions : matrix multiplication
lixin chu
lixin_chu at yahoo.com
Wed Jul 20 09:35:13 CDT 2016
Thank you very much for the quick reply.
Sent from Yahoo Mail on Android
On Wed, 20 Jul, 2016 at 7:20, Barry Smith<bsmith at mcs.anl.gov> wrote:
> On Jul 19, 2016, at 7:01 AM, lixin chu <lixin_chu at yahoo.com> wrote:
>
> Hello,
> I am new to PETsc, and I am looking for a library to support matrix multiplication. I have several questions and would like to confirm:
>
> 1. From MatMatMult API, for C=A*B, I assume we can support mixed sparse and dense matrix, i.e., either A or B can be dense; similarly, MatMatMatMult (A*B*C) can support A and C sparse, and B is dense.
We do not have code for all combinations.
>
> 2. We can also use mixed data type for MatMatMult/MatMatMatMult, for example, A is complex, double, and B is double.
PETSc only supports all real or all complex, not missing.
>
> 3. Is there a way to estimate the total working memory required for MatMatMult/MatMatMatMult, given A,B and C information (like dimensions, and total none zero elements, data type)
Whenever one of the matrices is dense the result is dense so it is easy to compute in that case.
If all the matrices are sparse it is difficult to predict the sparsity of the final result (generally is is a bit denser than the most dense of the sparse matrices). We make some estimates before we start the symbolic multiple and if we need more space we allocate more.
>
> 4. do we have any performance/memory usage data when compared with other sparse matrix multiplication solutions. for example. PSBLAS
No
> ?
>
> thank you very much,
>
> lixin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160720/70688e1e/attachment.html>
More information about the petsc-users
mailing list