I am trying to multiply the transpose of a matrix with another matrix using matmatmult.  The transpose operator is created using MatTranspose. I get the error at the end of the email. Is this an error saying that cols of matrix 1 and not equal to the rows of matrix 2? I checked and the rows and columns seem to allow matrix multiplication: Left = (54,1760), Right=(1760,54).  The snipped of the code which produces this is <div>
<br></div><div><div>  ierr = MatMatMult(*KFullMat,ProjR,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&TempMat);CHKERRQ(ierr);</div><div>  ierr = MatGetSize(ProjLT,&nrowl,&ncoll); CHKERRQ(ierr);</div><div>  ierr = MatGetSize(TempMat,&nrowr,&ncolr); CHKERRQ(ierr);</div>
<div>  ierr = PetscPrintf(PETSC_COMM_WORLD,"Left = (%d,%d), Right=(%d,%d)\n",nrowl,ncoll,nrowr,ncolr); CHKERRQ(ierr);</div><div>  ierr = MatMatMult(ProjLT,TempMat,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KProj); CHKERRQ(ierr);</div>
<div>  ierr = MatDestroy(&TempMat); </div><div><br></div><div>Thanks,</div><div><br></div><div>-Nachiket</div><div><br><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div>
<div><div><div>[0]PETSC ERROR: Arguments are incompatible!</div><div>[0]PETSC ERROR: MatMatMult requires A, seqdense, to be compatible with B, seqdense!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 2, Fri Jul 13 15:42:00 CDT 2012 </div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div>
<div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: /home/gokhale/WAIGEN/GDEB-WAIGEN2012/bin/waigen on a linux-gcc named <a href="http://asd1.wai.com">asd1.wai.com</a> by gokhale Mon Dec 17 16:58:13 2012</div>
<div>[0]PETSC ERROR: Libraries linked from /opt/petsc/petsc-3.3-p2/linux-gcc-g++-mpich-mumps-complex-debug/lib</div><div>[0]PETSC ERROR: Configure run at Mon Oct 29 18:41:24 2012</div><div>[0]PETSC ERROR: Configure options --with-x=0 --with-mpi=1 --download-mpich=yes --with-x11=0 --with-debugging=1 --with-clanguage=C++ --with-shared-libraries=1 --download-mumps=yes --download-f-blas-lapack=1 --download-parmetis=1 --download-metis --download-scalapack=1 --download-blacs=1 --with-cmake=/usr/bin/cmake28 --with-scalar-type=complex</div>
<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: MatMatMult() line 8601 in /opt/petsc/petsc-3.3-p2/src/mat/interface/matrix.c</div><div>[0]PETSC ERROR: waigensolvprojforc() line 33 in src/examples/waigensolvprojforc.c</div>
</div><div><br></div></div></div></div>