Hong:<div><br></div><div>I used 3.3-p2 but I was able to reproduce this error with 3.3-p5 as well. I ran it with one MPI process. I got the same error, </div><div><br></div><div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</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 5, Sat Dec  1 15:10:41 CST 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 Tue Dec 18 10:44:18 2012</div>
<div>[0]PETSC ERROR: Libraries linked from /opt/petsc/petsc-3.3-p5/linux-gcc-g++-mpich-mumps-complex-debug/lib</div><div>[0]PETSC ERROR: Configure run at Tue Dec 18 10:09:32 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 8617 in /opt/petsc/petsc-3.3-p5/src/mat/interface/matrix.c</div><div>[0]PETSC ERROR: waigensolvprojforc() line 31 in src/examples/waigensolvprojforc.c</div>
</div><div><br></div><div><br></div><div><div>Using one MPI process, this error goes away when I make a temporary matrix and store the result of the first multiplication in it as in:</div><div><br></div><div><div>  ierr = MatLoad(ProjR,viewer);CHKERRQ(ierr);</div>
<div>  ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);</div><div>  ierr = MatMatMult(*KFullMat,ProjR,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&TempMat);CHKERRQ(ierr);</div><div>  ierr = MatDuplicate(TempMat,MAT_COPY_VALUES,&TempMat2); CHKERRQ(ierr);</div>
<div>  ierr = MatMatMult(ProjLT,TempMat2,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KProj); CHKERRQ(ierr);</div><div>  ierr = MatDestroy(&TempMat);CHKERRQ(ierr);</div><div>  ierr = MatDestroy(&TempMat2);CHKERRQ(ierr);</div>
</div><div><br></div><div>If I run more than one process the error returns. </div><div><br></div><div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: Arguments are incompatible!</div>
<div>[0]PETSC ERROR: MatMatMult requires A, mpidense, to be compatible with B, mpidense!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 5, Sat Dec  1 15:10:41 CST 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 Tue Dec 18 10:42:15 2012</div>
<div>[0]PETSC ERROR: Libraries linked from /opt/petsc/petsc-3.3-p5/linux-gcc-g++-mpich-mumps-complex-debug/lib</div><div>[0]PETSC ERROR: Configure run at Tue Dec 18 10:09:32 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 8617 in /opt/petsc/petsc-3.3-p5/src/mat/interface/matrix.c</div><div>[0]PETSC ERROR: waigensolvprojforc() line 31 in src/examples/waigensolvprojforc.c</div>
</div><div><br></div><div><br></div><div>If it matters I am using Petsc through SlepC-3.3-p3</div><div><br></div><div>-Nachiket</div><div><br></div><br><div class="gmail_quote">On Mon, Dec 17, 2012 at 11:05 PM, Hong Zhang <span dir="ltr"><<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nachiket :<br>
<br>
Which version of petsc is used? Did you run the code in sequential?<br>
<div class="im"><br>
> ------------------------------------<br>
> [0]PETSC ERROR: Arguments are incompatible!<br>
> [0]PETSC ERROR: MatMatMult requires A, seqdense, to be compatible with B,<br>
> seqdense!<br>
</div><div class="im">[0]PETSC ERROR: MatMatMult() line 8601 in<br>
/opt/petsc/petsc-3.3-p2/src/mat/interface/matrix.c<br>
<br>
</div>The line (8601) does not match the latest petsc-3.3 and petsc-dev.<br>
I cannot reproduce this error from the latest petsc-3.3 and petsc-dev.<br>
<br>
The error complains about a failure to find MatMatMult_SeqDense_SeqDense().<br>
Can you update to the latest petsc-3.3 or petsc-dev and see if your<br>
code still crashes?<br>
<span class="HOEnZb"><font color="#888888"><br>
Hong<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> I am trying to multiply the transpose of a matrix with another matrix using<br>
> matmatmult.  The transpose operator is created using MatTranspose. I get the<br>
> error at the end of the email. Is this an error saying that cols of matrix 1<br>
> and not equal to the rows of matrix 2? I checked and the rows and columns<br>
> seem to allow matrix multiplication: Left = (54,1760), Right=(1760,54).  The<br>
> snipped of the code which produces this is<br>
><br>
>   ierr =<br>
> MatMatMult(*KFullMat,ProjR,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&TempMat);CHKERRQ(ierr);<br>
>   ierr = MatGetSize(ProjLT,&nrowl,&ncoll); CHKERRQ(ierr);<br>
>   ierr = MatGetSize(TempMat,&nrowr,&ncolr); CHKERRQ(ierr);<br>
>   ierr = PetscPrintf(PETSC_COMM_WORLD,"Left = (%d,%d),<br>
> Right=(%d,%d)\n",nrowl,ncoll,nrowr,ncolr); CHKERRQ(ierr);<br>
>   ierr = MatMatMult(ProjLT,TempMat,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KProj);<br>
> CHKERRQ(ierr);<br>
>   ierr = MatDestroy(&TempMat);<br>
><br>
> Thanks,<br>
><br>
> -Nachiket<br>
><br>
> [0]PETSC ERROR: --------------------- Error Message<br>
> ------------------------------------<br>
> [0]PETSC ERROR: Arguments are incompatible!<br>
> [0]PETSC ERROR: MatMatMult requires A, seqdense, to be compatible with B,<br>
> seqdense!<br>
> [0]PETSC ERROR:<br>
> ------------------------------------------------------------------------<br>
> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 2, Fri Jul 13 15:42:00<br>
> CDT 2012<br>
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
> [0]PETSC ERROR: See docs/index.html for manual pages.<br>
> [0]PETSC ERROR:<br>
> ------------------------------------------------------------------------<br>
> [0]PETSC ERROR: /home/gokhale/WAIGEN/GDEB-WAIGEN2012/bin/waigen on a<br>
> linux-gcc named <a href="http://asd1.wai.com" target="_blank">asd1.wai.com</a> by gokhale Mon Dec 17 16:58:13 2012<br>
> [0]PETSC ERROR: Libraries linked from<br>
> /opt/petsc/petsc-3.3-p2/linux-gcc-g++-mpich-mumps-complex-debug/lib<br>
> [0]PETSC ERROR: Configure run at Mon Oct 29 18:41:24 2012<br>
> [0]PETSC ERROR: Configure options --with-x=0 --with-mpi=1<br>
> --download-mpich=yes --with-x11=0 --with-debugging=1 --with-clanguage=C++<br>
> --with-shared-libraries=1 --download-mumps=yes --download-f-blas-lapack=1<br>
> --download-parmetis=1 --download-metis --download-scalapack=1<br>
> --download-blacs=1 --with-cmake=/usr/bin/cmake28 --with-scalar-type=complex<br>
> [0]PETSC ERROR:<br>
> ------------------------------------------------------------------------<br>
> [0]PETSC ERROR: MatMatMult() line 8601 in<br>
> /opt/petsc/petsc-3.3-p2/src/mat/interface/matrix.c<br>
> [0]PETSC ERROR: waigensolvprojforc() line 33 in<br>
> src/examples/waigensolvprojforc.c<br>
><br>
</div></div></blockquote></div><br></div>