Re: [petsc-dev] MatTransposeMatMult
Jed, I reproduced what you observed. 30x time is spent on numerical C = At*B. We compute A^T*B using outer product C=(A^T)[:,i]*B[i,:]. For your large matrix A: rows=574902, cols=184446, outer product takes long long time to insert values to C. We may use At=A^T and C=At*B instead. Hong On Thu, Sep 21, 2017 at 9:59 AM, Hong <[email protected]> wrote:
Jed :
~jedbrown/ceres_solver_iteration_001_A.petsc on mcs.anl.gov.
I got this file. How many matrices in this file? How to load them? It seems the first matrix is rectangular.
Hong
The issue is that MatTransposeMatMult is implemented using sparse outer products which is quite inefficient compared to the standard MatMatMult algorithm.
Barry Smith <[email protected]> writes:
Send the runable case so that we can determine the cause of the slow down and find possible cures. It could be that the "optimized" version was optimized for a particular size of problems or matrix structure.
Barry
On Sep 20, 2017, at 4:32 PM, Jed Brown <[email protected]> wrote:
I have a simple SeqAIJ example where MatTransposeMatMult is 30x slower than MatTranspose followed by MatMatMult. This is embarrassing when people try to compare performance. Are there any cases where these custom implementations provide value rather than just confusing people or turning them away from PETSc?
participants (1)
-
Hong