<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Feb 11, 2017 at 11:27 AM, Manav Bhatia <span dir="ltr"><<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I am now getting this error, which is complaining for an operation for the shell matrix. I have only specified the following operation for the matrix: “<span style="color:rgb(0,125,181);font-family:Monaco">MATOP_MULT</span>”.</div><div><br></div><div>I am calling the solver with -pc_type fieldsplit.</div><div><br></div><div>What can I do to move forward with the solution? </div></div></blockquote><div><br></div><div>Okay, this has defeated our check. The MatNest says "yes I have a transpose operation", but</div><div>that call fails when it gets to your submatrix.</div><div><br></div><div>I think we might need to do something to push this call down in MatNest.</div><div><br></div><div>However, right now, just remove that operation from your MatNest</div><div><br></div><div>  MatSetOperation(A, MATOP_TRANSPOSE, NULL);</div><div><br></div><div>so that it gives the right answer.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Thanks,</div><div>Manav</div><div> </div><div><br></div><div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[1;31m[0]PETSC ERROR: --------------------- Error Message ------------------------------<wbr>------------------------------<wbr>--</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0;39m[0;49m[0]PETSC ERROR: No support for this operation for this object type</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: Mat type shell</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/faq.html</a> for trouble shooting.</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: Petsc Release Version 3.7.4, Oct, 02, 2016 </span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: /Users/manav/Library/<wbr>Developer/Xcode/DerivedData/<wbr>MAST-<wbr>crggwcqrouiyeucduvscdahjauvx/<wbr>Build/Products/Debug/examples on a arch-darwin-cxx-opt named Blackbird.local by manav Sat Feb 11 11:17:44 2017</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: Configure options --prefix=/Users/manav/<wbr>Documents/codes/numerical_lib/<wbr>petsc/petsc-3.7.4/../ --CC=mpicc-openmpi-clang38 --CXX=mpicxx-openmpi-clang38 --FC=mpif90-openmpi-clang38 --with-clanguage=c++ --with-fortran=0 --with-mpiexec=/opt/local/bin/<wbr>mpiexec-openmpi-clang38 --with-shared-libraries=1 --with-x=1 --with-x-dir=/opt/X11 --with-debugging=0 --with-lapack-lib=/usr/lib/<wbr>liblapack.dylib --with-blas-lib=/usr/lib/<wbr>libblas.dylib --download-superlu=yes --download-superlu_dist=yes --download-suitesparse=yes --download-mumps=yes --download-scalapack=yes --download-parmetis=yes --download-metis=yes --download-hypre=yes --download-ml=yes</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: #1 MatMultTransposeAdd() line 2486 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/mat/interface/matrix.c</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: #2 MatMultTranspose_Nest() line 109 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/mat/impls/nest/matnest.c</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: #3 MatMultTranspose() line 2320 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/mat/interface/matrix.c</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: #4 SNESNEWTONLSCheckLocalMin_<wbr>Private() line 25 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/snes/impls/ls/ls.c</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: #5 SNESSolve_NEWTONLS() line 259 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/snes/impls/ls/ls.c</span></div><div style="margin:0px;line-height:normal;font-family:Monaco"><span style="font-variant-ligatures:no-common-ligatures">[0]PETSC ERROR: #6 SNESSolve() line 4005 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/snes/interface/snes.c</span></div></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><br></div><br><div><blockquote type="cite"><div>On Feb 9, 2017, at 11:29 AM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote:</div><br class="m_2312105532757592680Apple-interchange-newline"><div><div><br><blockquote type="cite">On Feb 8, 2017, at 11:39 PM, Dave May <<a href="mailto:dave.mayhem23@gmail.com" target="_blank">dave.mayhem23@gmail.com</a>> wrote:<br><br>Any time you modify one of the submats, you need to call assembly begin/end on that sub matrix AND on the outer matnest object.<br></blockquote><br>   Weird, and prone to errors it seems to me. Perhaps this needs to be rethought<br><br><blockquote type="cite"><br>Thanks,<br>  Dave<br><br><br>On Wed, 8 Feb 2017 at 22:51, Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>> wrote:<br>aha.. that might be it.<br><br>Does that need to be called for the global matrix after each assembly of the Jacobian blocks, or just once for the whole matrix?<br><br>-Manav<br><br><blockquote type="cite">On Feb 8, 2017, at 3:47 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote:<br><br><br><blockquote type="cite">On Feb 8, 2017, at 3:40 PM, Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>> wrote:<br><br>Hi,<br><br>  I have a nested matrix with 2x2 blocks. The blocks (1,1) and (2,2) are AIJ matrices and blocks (1,2) and (2,1) and shell matrices. I am calling the code with the following arguments: -pc_type fieldsplit , and get the error shown below.<br><br>  I see that the error is complaining about the matrix being in unassembled state, but I think I am initializing and calling assembly end routines on both the diagonal blocks. Still, there is something obvious I am missing.<br></blockquote><br> It is complaining about the outer most matrix, not the blocks. Perhaps you haven't finished with setting up your nest matrix?<br><br><blockquote type="cite"><br>  I would appreciate any guidance on this.<br><br>Regards,<br>Manav<br><br><br><br>[1;31m[0]PETSC ERROR: --------------------- Error Message ------------------------------<wbr>------------------------------<wbr>--<br>[0;39m[0;49m[0]PETSC ERROR: Object is in wrong state<br>[0]PETSC ERROR: Not for unassembled matrix<br>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/faq.html</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.7.4, Oct, 02, 2016<br>[0]PETSC ERROR: /Users/manav/Library/<wbr>Developer/Xcode/DerivedData/<wbr>MAST-<wbr>crggwcqrouiyeucduvscdahjauvx/<wbr>Build/Products/Debug/examples on a arch-darwin-cxx-opt named <a href="http://Dhcp-90-250.HPC.MsState.Edu" target="_blank">Dhcp-90-250.HPC.MsState.Edu</a> by manav Wed Feb  8 15:28:04 2017<br>[0]PETSC ERROR: Configure options --prefix=/Users/manav/<wbr>Documents/codes/numerical_lib/<wbr>petsc/petsc-3.7.4/../ --CC=mpicc-openmpi-clang38 --CXX=mpicxx-openmpi-clang38 --FC=mpif90-openmpi-clang38 --with-clanguage=c++ --with-fortran=0 --with-mpiexec=/opt/local/bin/<wbr>mpiexec-openmpi-clang38 --with-shared-libraries=1 --with-x=1 --with-x-dir=/opt/X11 --with-debugging=0 --with-lapack-lib=/usr/lib/<wbr>liblapack.dylib --with-blas-lib=/usr/lib/<wbr>libblas.dylib --download-superlu=yes --download-superlu_dist=yes --download-suitesparse=yes --download-mumps=yes --download-scalapack=yes --download-parmetis=yes --download-metis=yes --download-hypre=yes --download-ml=yes<br>[0]PETSC ERROR: #1 MatMult() line 2248 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/mat/interface/matrix.c<br>[0]PETSC ERROR: #2 PCApplyBAorAB() line 717 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/ksp/pc/interface/precon.<wbr>c<br>[0]PETSC ERROR: #3 KSP_PCApplyBAorAB() line 274 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/include/petsc/private/<wbr>kspimpl.h<br>[0]PETSC ERROR: #4 KSPGMRESCycle() line 156 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/ksp/ksp/impls/gmres/<wbr>gmres.c<br>[0]PETSC ERROR: #5 KSPSolve_GMRES() line 240 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/ksp/ksp/impls/gmres/<wbr>gmres.c<br>[0]PETSC ERROR: #6 KSPSolve() line 656 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/ksp/ksp/interface/<wbr>itfunc.c<br>[0]PETSC ERROR: #7 SNESSolve_NEWTONLS() line 230 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/snes/impls/ls/ls.c<br>[0]PETSC ERROR: #8 SNESSolve() line 4005 in /Users/manav/Documents/codes/<wbr>numerical_lib/petsc/petsc-3.7.<wbr>4/src/snes/interface/snes.c<br><br></blockquote><br></blockquote><br></blockquote><br></div></div></blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>