Jed :
New implementation for seqaij is in branch hzhang/opt-mattransposematmult.
petsc/src/mat/examples/tests/ex209.c is a test.
Please give it a try and let me know if you have any comment.

I'll remove previous implementation and optimize MatTransposeMatMult() for mpiaij matrices.

Hong

Hong <hzhang@mcs.anl.gov> writes:

> It was implemented a decade ago for small to medium matrices.
> Your matrix structure reveals the worst part of outer product.
>
> After discussing it with Barry, we decided to replace the algorithm (not
> API) using At=A^T and C=At*B  for sequential implementation.
> In parallel, I'll do local MatTranspose (used for PtAP).
> I'll give you this new implementation in few days.

Perfect, thanks!