<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 11, 2014 at 4:22 PM, Khai Hong Pham <span dir="ltr"><<a href="mailto:khaipham@utexas.edu" target="_blank">khaipham@utexas.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you for your information, Matt. I'm using both nested matrix and nested vector. Is the nested vector good to use ?</div>
</blockquote><div><br></div><div>Again, these are implementation classes. Always test with the simple version, and then switch dynamically</div><div>to these when you want better performance. The whole point of PETSc is that you can do this, rather than</div>
<div>hardcoding a particular type.</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 dir="ltr"><div>Khai.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Aug 11, 2014 at 4:16 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Mon, Aug 11, 2014 at 3:53 PM, Khai Hong Pham <span dir="ltr"><<a href="mailto:khaipham@utexas.edu" target="_blank">khaipham@utexas.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Matt, <div><br></div><div>I've the following error as I tried to get the sub block matrix. I check the isrow and iscol that are passed to<font color="#000000"> <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">MatGetSubMatrix</span> and</font> they look ok to me. The line 110 of  ISStrideGetInfo() calls to PetscValidHeaderSpecific. </div>


</div></blockquote><div><br></div></div><div>You have something corrupt in the MatNest. Quit using MatNest. This is just an optimization that should</div><div>only be turned on by -mat_type nest. It is not a top level interface. This causes so many problems that we</div>


<div>should remove it from the documentation.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr"><div><br></div><div><div>[0]PETSC ERROR: Null argument, when expecting valid pointer</div><div>[0]PETSC ERROR: Null Object: Parameter # 1</div><div>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div>



<div>[0]PETSC ERROR: Petsc Release Version 3.5.1, Jul, 24, 2014 </div><div>[0]PETSC ERROR: [1]PETSC ERROR: ./PFFEM2DSolver on a arch-linux2-c-debug named khp by khp Mon Aug 11 15:26:47 2014</div><div>Null argument, when expecting valid pointer</div>



<div>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --download-hdf5 --download-metis --download-parmetis</div><div>[1]PETSC ERROR: Null Object: Parameter # 1</div>



<div>[1]PETSC ERROR: [0]PETSC ERROR: #1 ISStrideGetInfo() line 110 in /home/khp/bin/petsc-3.5.1/src/vec/is/is/impls/stride/stride.c</div><div>See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div>



<div>[1]PETSC ERROR: Petsc Release Version 3.5.1, Jul, 24, 2014 </div><div>[1]PETSC ERROR: ./PFFEM2DSolver on a arch-linux2-c-debug named khp by khp Mon Aug 11 15:26:47 2014</div><div>[1]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --download-hdf5 --download-metis --download-parmetis</div>



<div>[1]PETSC ERROR: #1 ISStrideGetInfo() line 110 in /home/khp/bin/petsc-3.5.1/src/vec/is/is/impls/stride/stride.c</div><div>[0]PETSC ERROR: #2 MatNestFindSubMat() line 357 in /home/khp/bin/petsc-3.5.1/src/mat/impls/nest/matnest.c</div>



<div>[0]PETSC ERROR: #3 MatGetLocalSubMatrix_Nest() line 411 in /home/khp/bin/petsc-3.5.1/src/mat/impls/nest/matnest.c</div><div>[0]PETSC ERROR: #4 MatGetLocalSubMatrix() line 9224 in /home/khp/bin/petsc-3.5.1/src/mat/interface/matrix.c</div>



<div>[1]PETSC ERROR: #2 MatNestFindSubMat() line 357 in /home/khp/bin/petsc-3.5.1/src/mat/impls/nest/matnest.c</div><div>[0]PETSC ERROR: #5 jacobian_comp() line 49 in src/assembly.cpp</div><div>[1]PETSC ERROR: #3 MatGetLocalSubMatrix_Nest() line 411 in /home/khp/bin/petsc-3.5.1/src/mat/impls/nest/matnest.c</div>



<div>[0]PETSC ERROR: [1]PETSC ERROR: #6 TaoComputeJacobian() line 153 in /home/khp/bin/petsc-3.5.1/src/tao/interface/taosolver_hj.c</div><div>#4 MatGetLocalSubMatrix() line 9224 in /home/khp/bin/petsc-3.5.1/src/mat/interface/matrix.c</div>



<div>[0]PETSC ERROR: [1]PETSC ERROR: #7 Tao_SSLS_FunctionGradient() line 63 in /home/khp/bin/petsc-3.5.1/src/tao/complementarity/impls/ssls/ssls.c</div><div>#5 jacobian_comp() line 49 in src/assembly.cpp</div><div>[0]PETSC ERROR: #8 TaoLineSearchComputeObjectiveAndGradient() line 941 in /home/khp/bin/petsc-3.5.1/src/tao/linesearch/interface/taolinesearch.c</div>



<div>[1]PETSC ERROR: #6 TaoComputeJacobian() line 153 in /home/khp/bin/petsc-3.5.1/src/tao/interface/taosolver_hj.c</div><div>[0]PETSC ERROR: #9 TaoSolve_SSILS() line 65 in /home/khp/bin/petsc-3.5.1/src/tao/complementarity/impls/ssls/ssils.c</div>



<div>[1]PETSC ERROR: #7 Tao_SSLS_FunctionGradient() line 63 in /home/khp/bin/petsc-3.5.1/src/tao/complementarity/impls/ssls/ssls.c</div><div>[0]PETSC ERROR: #10 TaoSolve() line 188 in /home/khp/bin/petsc-3.5.1/src/tao/interface/taosolver.c</div>



<div>[1]PETSC ERROR: #8 TaoLineSearchComputeObjectiveAndGradient() line 941 in /home/khp/bin/petsc-3.5.1/src/tao/linesearch/interface/taolinesearch.c</div><div>[0]PETSC ERROR: #11 main() line 286 in src/main.cpp</div><div>



[1]PETSC ERROR: #9 TaoSolve_SSILS() line 65 in /home/khp/bin/petsc-3.5.1/src/tao/complementarity/impls/ssls/ssils.c</div><div>[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------</div>



<div>[1]PETSC ERROR: #10 TaoSolve() line 188 in /home/khp/bin/petsc-3.5.1/src/tao/interface/taosolver.c</div><div>[1]PETSC ERROR: #11 main() line 286 in src/main.cpp</div><div>[1]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------</div>



</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 11, 2014 at 12:34 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Mon, Aug 11, 2014 at 12:05 PM, Khai Hong Pham <span dir="ltr"><<a href="mailto:khaipham@utexas.edu" target="_blank">khaipham@utexas.edu</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Petsc-Users,<div><br></div><div>In the MatGetSubMatrix, if the matrix mat is a nested matrix, for example [ A00 A01 | A10 A11], and I'd like to get submat  A10. Then the isrow and iscol will be the index of the subblock matrix which is (1,0) or it must be the index of all rows, columns of the submat in the mat (like in <span style="color:rgb(0,0,0)">MatGetSubMatrix)</span>. Please help me to clarify this. </div>




</div></blockquote><div><br></div></div><div>It is the later (the list of rows/cols)</div><div><br></div><div>  Thsnks,</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 dir="ltr"><div>Thanks</div><span><font color="#888888">
<div><br></div><div>Khai</div></font></span></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><br></div>-- <br>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
</font></span></font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><div><div><br><br clear="all"><div><br></div>-- <br>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></font></span></div></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>