On Thu, Nov 1, 2012 at 9:47 AM, w_ang_temp <span dir="ltr"><<a href="mailto:w_ang_temp@163.com" target="_blank">w_ang_temp@163.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;font-size:14px;font-family:arial"><div>Hello,</div>
<div>   I have just used the latest version 'petsc-3.3-p4.tar.gz'. The codes which are ok under version 'petsc-3.2-p7.tar.gz'</div>
<div>are not ok now. The error infomation is as follows. So if can I still use the original codes without any</div>
<div>modification and also use multigrid with -pc_type gamg -pc_gamg_agg_nsmooths 1.</div>
<div>   Thanks.</div>
<div>                                                          Jim</div>
<div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[0]PETSC ERROR: Object is in wrong state!<br>[0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetOwnershipRange()!<br>
</div></div></blockquote><div><br></div><div>This says what is wrong. Now you must either preallocate your matrix or turn of this error using MatSetOption()</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="line-height:1.7;font-size:14px;font-family:arial"><div>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 4, Fri Oct 26 10:46:51 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>
[0]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by ubu Thu Nov  1 06:10:23 2012<br>[0]PETSC ERROR: Libraries linked from /home/ubu/soft/petsc/petsc-3.3-p4/arch-linux2-c-debug/lib<br>[0]PETSC ERROR: Configure run at Thu Nov  1 05:54:48 2012<br>
[0]PETSC ERROR: Configure options --with-mpi-dir=/home/ubu/soft/mpich2/ --download-f-blas-lapack =1<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: MatGetOwnershipRange() line 5992 in src/mat/interface/matrix.c<br>
[1]PETSC ERROR: [2]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[2]PETSC ERROR: Object is in wrong state!<br>[2]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetOwnershipRange()!<br>
[2]PETSC ERROR: ------------------------------------------------------------------------<br>[2]PETSC ERROR: Petsc Release Version 3.3.0, Patch 4, Fri Oct 26 10:46:51 CDT 2012 <br>[2]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[2]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[2]PETSC ERROR: See docs/index.html for manual pages.<br>[2]PETSC ERROR: ------------------------------------------------------------------------<br>[2]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by ubu Thu Nov  1 06:10:23 2012<br>
[2]PETSC ERROR: Libraries linked from /home/ubu/soft/petsc/petsc-3.3-p4/arch-linux2-c-debug/lib<br>[2]PETSC ERROR: Configure run at Thu Nov  1 05:54:48 2012<br>[2]PETSC ERROR: Configure options --with-mpi-dir=/home/ubu/soft/mpich2/ --download-f-blas-lapack =1<br>
[2]PETSC ERROR: ------------------------------------------------------------------------<br>[2]PETSC ERROR: MatGetOwnershipRange() line 5992 in src/mat/interface/matrix.c<br>[3]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[3]PETSC ERROR: Object is in wrong state!<br>[3]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetOwnershipRange()!<br>[3]PETSC ERROR: ------------------------------------------------------------------------<br>
[3]PETSC ERROR: Petsc Release Version 3.3.0, Patch 4, Fri Oct 26 10:46:51 CDT 2012 <br>[3]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[3]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[3]PETSC ERROR: See docs/index.html for manual pages.<br>[3]PETSC ERROR: ------------------------------------------------------------------------<br>[3]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by ubu Thu Nov  1 06:10:23 2012<br>
[3]PETSC ERROR: Libraries linked from /home/ubu/soft/petsc/petsc-3.3-p4/arch-linux2-c-debug/lib<br>[3]PETSC ERROR: Configure run at Thu Nov  1 05:54:48 2012<br>[3]PETSC ERROR: Configure options --with-mpi-dir=/home/ubu/soft/mpich2/ --download-f-blas-lapack =1<br>
[3]PETSC ERROR: ------------------------------------------------------------------------<br>[3]PETSC ERROR: MatGetOwnershipRange() line 5992 in src/mat/interface/matrix.c<br>--------------------- Error Message ------------------------------------<br>
[1]PETSC ERROR: Object is in wrong state!<br>[1]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetOwnershipRange()!<br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>
[1]PETSC ERROR: Petsc Release Version 3.3.0, Patch 4, Fri Oct 26 10:46:51 CDT 2012 <br>[1]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[1]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[1]PETSC ERROR: See docs/index.html for manual pages.<br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by ubu Thu Nov  1 06:10:23 2012<br>
[1]PETSC ERROR: Libraries linked from /home/ubu/soft/petsc/petsc-3.3-p4/arch-linux2-c-debug/lib<br>[1]PETSC ERROR: Configure run at Thu Nov  1 05:54:48 2012<br>[1]PETSC ERROR: Configure options --with-mpi-dir=/home/ubu/soft/mpich2/ --download-f-blas-lapack =1<br>
[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: MatGetOwnershipRange() line 5992 in src/mat/interface/matrix.c<br>[1]PETSC ERROR: [2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[3]PETSC ERROR: Object is in wrong state!<br>[3]PETSC ERROR: Matrix is missing diagonal entry 0!<br>[3]PETSC ERROR: ------------------------------------------------------------------------<br>[3]PETSC ERROR: Petsc Release Version 3.3.0, Patch 4, Fri Oct 26 10:46:51 CDT 2012 <br>
[3]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[3]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[3]PETSC ERROR: See docs/index.html for manual pages.<br>[3]PETSC ERROR: ------------------------------------------------------------------------<br>
[3]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by ubu Thu Nov  1 06:10:23 2012<br>[3]PETSC ERROR: Libraries linked from /home/ubu/soft/petsc/petsc-3.3-p4/arch-linux2-c-debug/lib<br>[3]PETSC ERROR: Configure run at Thu Nov  1 05:54:48 2012<br>
[3]PETSC ERROR: Configure options --with-mpi-dir=/home/ubu/soft/mpich2/ --download-f-blas-lapack =1<br>[3]PETSC ERROR: ------------------------------------------------------------------------<br>[3]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ_ilu0() line 1641 in src/mat/impls/aij/seq/aijfact.c<br>
[3]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ() line 1745 in src/mat/impls/aij/seq/aijfact.c<br>[3]PETSC ERROR: MatILUFactorSymbolic() line 6130 in src/mat/interface/matrix.c<br>[3]PETSC ERROR: PCSetUp_ILU() line 216 in src/ksp/pc/impls/factor/ilu/ilu.c<br>
[3]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c<br>[3]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c<br>[3]PETSC ERROR: PCSetUpOnBlocks_BJacobi_Singleblock() line 715 in src/ksp/pc/impls/bjacobi/bjacobi.c<br>
[3]PETSC ERROR: PCSetUpOnBlocks() line 865 in src/ksp/pc/interface/precon.c<br>[3]PETSC ERROR: KSPSetUpOnBlocks() line 154 in src/ksp/ksp/interface/itfunc.c<br>[3]PETSC ERROR: KSPSolve() line 403 in src/ksp/ksp/interface/itfunc.c<br>
Fatal error in MPI_Send: Invalid count, error stack:<br>MPI_Send(173): MPI_Send(buf=0x100, count=-199040697, MPI_REAL, dest=0, tag=3, MPI_COMM_WORLD) failed<br>MPI_Send(97).: Negative count, value is -199040697</div>
<div> </div>
<div><br><br><br><br><br> </div>
<div></div>
<div></div>
<div><br></div>>在 2012-10-29 21:57:49,"Mark F. Adams" <<a href="mailto:mark.adams@columbia.edu" target="_blank">mark.adams@columbia.edu</a>> 写道:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex">>You need an updated PETSc. (I thought 3.2 had an early version of gamg … but you need 3.3 or dev) 
<div><br></div>
<div>>Mark</div>
<div><br>
<div>
<div>>On Oct 29, 2012, at 8:49 AM, w_ang_temp <<a href="mailto:w_ang_temp@163.com" target="_blank">w_ang_temp@163.com</a>> wrote:</div><br>
<blockquote type="cite">
<div style="LINE-HEIGHT:1.7;FONT-FAMILY:arial;FONT-SIZE:14px">
<div>>Hello, Jed</div>
<div>>    I use the command:</div>
<div>>    mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type gamg -pc_gamg_agg_nsmooths 1  -ksp_rtol 1.0e-15 -ksp_converged_reason</div>
<div>>    The error is as follows:<br>>[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>>[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing external package needed for type<br>
> <a>seehttp://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#external!</a><br>>[0]PETSC ERROR: Unable to find requested PC type gamg!<br>>[0]PETSC ERROR: ------------------------------------------------------------------------<br>
>[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 7, Thu Mar 15 09:30:51 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>>[0]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by geo Mon Oct 29 05:40:13 2012<br>
>[0]PETSC ERROR: Libraries linked from /home /geo/soft/petsc/petsc-3.2-p7/arch-linux2-c-opt/lib<br>>[0]PETSC ERROR: Configure run at Mon Jul  2 20:33:17 2012<br>>[0]PETSC ERROR: Configure options --with-mpi-dir=/home/geo/soft/mpich2 --download-f-blas-lapack=1 --with-x=1 --with-debugging=0 -->download-parmetis --download-mumps --download-scalapack --download-blacs<br>
>[0]PETSC ERROR: ------------------------------------------------------------------------<br>>[0]PETSC ERROR: PCSetType() line 67 in src/ksp/pc/interface/pcset.c<br>>[0]PETSC ERROR: PCSetFromOptions() line 184 in src/ksp/pc/interface/pcset.c<br>
>[0]PETSC ERROR: KSPSetFromOptions() line 286 in src/ksp/ksp/interface/itcl.c</div>
<div>>     When I use 'mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type sor -ksp_rtol 1.0e-15 -ksp_converged_reason', it is ok. So</div>
<div>>what is the possible reason?</div>
<div>>     Thanks.</div>
<div>>                                                    Jim<br><br><br><br><br></div>
<div></div>
<div></div>
<div><br></div>>>At 2012-10-28 22:25:31,"Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex">
<p>>>Try the simple option I just sent.</p>
<div class="gmail_quote">>>On Oct 28, 2012 6:38 AM, "w_ang_temp" <<a href="mailto:w_ang_temp@163.com" target="_blank">w_ang_temp@163.com</a>> wrote:<br type="attribution">
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div style="LINE-HEIGHT:1.7;FONT-FAMILY:arial;FONT-SIZE:14px">
<div>>>Hello, Jed</div>
<div>>>    Thanks for your timely reply. I deal with the soil-water coupled problem in geotechnical engineering,  </div>
<div>>>whose stiffness matrix is ill-conditioned. I have did some work about it, mainly finding the effective</div>
<div>>>solvers and preconditioners. I used the command line option like this:</div>
<div>>>mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type sor -ksp_rtol 1.0e-15 -ksp_converged_reason.</div>
<div>>>    So, I also want to use the multigrid just like the simple command. There is only a little introduction</div>
<div>>>about multigrid in the manual. Multigrid is complex and not a easy thing for me, so I just need to konw how</div>
<div>>>to use it simply in PETSc to solve the Ax=b system.</div>
<div>>>    Thanks.</div>
<div>                                                               Jim<br><br><br><br><br></div>
<div></div>
<div></div>
<div><br></div>>At 2012-10-28 21:17:00,"Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex">
<p>>Algebraic multigrid can be used directly, -pc_type gamg -pc_gamg_agg_nsmooths 1. Geometric either required that you use the PCMG interface to set >interpolation (and provide a coarse operator for non-Galerkin) or use a DM that provides coarsening capability.</p>

<p>>What kind of problem are you solving?</p>
<div class="gmail_quote">>>On Oct 28, 2012 6:09 AM, "w_ang_temp" <<a href="mailto:w_ang_temp@163.com" target="_blank">w_ang_temp@163.com</a>> wrote:<br type="attribution">
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div style="LINE-HEIGHT:1.7;FONT-FAMILY:arial;FONT-SIZE:14px">
<div>>>Hello,</div>
<div>>>   I want to use the multigrid as a preconditioner. The introduction about it in the manual is little.</div>
<div>>>So are there some typical examples or details about multigrid? Is it used just like other preconditioners</div>
<div>>>like jacobi, sor, which can be simply used in the cammand line options?</div>
<div>>>   Thanks.</div>
<div>>>                                                                       Jim</div></div><br><br><span title="neteasefooter"><span></span></span></blockquote></div></blockquote></div><br><br><span title="neteasefooter"><span></span></span></blockquote>
</div></blockquote></div><br><br><span title="neteasefooter"><span></span></span></blockquote></div><br></div></blockquote></div><br><br><span title="neteasefooter"><span></span></span></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<br>