Symmetric matrixes multiply
Matthew Knepley
knepley at gmail.com
Thu Nov 16 08:24:10 CST 2006
These questions are more suitable for petsc-maint. The problem here is the same.
It is not easy to calculate the nonzero pattern of the result,
although it can be done.
We did not have the resources to implement it for all matrix types. We
would be happy
to accept the code if you want to give it a try. The reason the we
have no A = A*B is
that A and A*B almost never have the saem nonzero pattern.
Matt
On 11/16/06, Cristiano Calonaci <c.calonaci at cineca.it> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> I'm using version Petsc version 2.3.2.
>
> 1 - I try to multiply two (symmetric) matrixes allocated using
>
> MatCreateMPISBAIJ()
>
> Mat A, B, C;
> ....
> bs = 1;
> ierr = MatCreateMPISBAIJ(PETSC_COMM_WORLD, bs, PETSC_DECIDE,
> PETSC_DECIDE, n, n,
> d_nz, d_nnz, o_nx, o_nnz, &A); CHKERRQ(ierr);
> ierr = MatCreateMPISBAIJ(PETSC_COMM_WORLD, bs, PETSC_DECIDE,
> PETSC_DECIDE, n, n,
> d_nz, d_nnz, o_nx, o_nnz, &B); CHKERRQ(ierr);
> using
>
> MatMatMult(A, B, MAT_INITIAL_MATRIX, 1., &C);
>
> but it doesn't work ....
>
> [0]PETSC ERROR: No support for this operation for this object type!
> [1]PETSC ERROR: MatMatMult not supported for B of type mpisbaij!
>
> Is there any workaround ?
>
> 2 - Is it possible using any PETSC functions to compute (for square
> matrixes)
>
> A = A*B
>
> instead that C=A*B and wasting memory if I don't need C ?
>
> Thank a lot for any help !
>
> Cristiano
>
> - --
> ______________________________________________________________________
>
> "Un programma di computer fa quello che gli dici, non quello che vuoi"
> Terza legge di Greer
> ______________________________________________________________________
>
> Cristiano Calonaci - Supercomputing Group - CINECA
> Via Magnanelli 6/3 - 40033 Casalecchio di Reno - Bologna - Italy
> Tel.+39-0516171421 - Fax.+39-0516137273 - e-mail: c.calonaci at cineca.it
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFFXCXFvt08LyoFZwMRAlzWAJ9yTXqwOZDE/ICg/byNqa45yR2FSACfWqfx
> CBZ5h8fes6i1w5IfrLfV5aA=
> =vTgK
> -----END PGP SIGNATURE-----
>
>
--
"Failure has a thousand explanations. Success doesn't need one" -- Sir
Alec Guiness
More information about the petsc-users
mailing list