[petsc-users] MatMatMult with MAT_INITIAL_MATRIX
Marius Buerkle
mbuerkle at web.de
Sun Apr 19 11:21:29 CDT 2020
Hi,
I have a question about the behavior of MAT_INITIAL_MATRIX for MatMatMult. I a have a set of MPIDENSE and MPIAIJ matrices for which I have defined the number of local rows (and local columns) manually, i.e. not used PETSC_DECIDE for MatSetSizes. The number of local rows is different from what PETSC_DECIDE would choose. If I do a MatMatMult with A=MPIDENSE and B=MPIAIJ with MAT_INITIAL_MATRIX then matrix C will have the number of local rows corresponding to A and B, namely what I have defined with MatSetSizes when creating the matrices A and B. But when both matrices are dense, A=MPIDENSE and B=MPIDENSE, then the resulting matrix C will have different number of local rows, namely what I would get with if I would create the matrix with PETSC_DECIDE. Is this behavior normal? The problem is that I have to multiply both resulting matrices which will then throw a "Nonconforming object sizes error" as they have different number of local rows. Any ideas what goes wrong here?
Marius
More information about the petsc-users
mailing list