> On Jul 19, 2016, at 7:01 AM, lixin chu <[email protected]> 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
