<div dir="ltr">Sorry, the codes attached were not the most recent versions. <div>Here is the code you can reproduce the error with. </div><div><br></div><div>Cheers, </div><div>Mohamad</div><div><br></div><div><br></div><div>

<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 27, 2013 at 4:08 PM, Mohamad M. Nasr-Azadani <span dir="ltr"><<a href="mailto:mmnasr@gmail.com" target="_blank">mmnasr@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">Thanks Jed, <div class="im"><div><span style="font-family:arial,sans-serif;font-size:13px">How did you create these matrices? </span></div>

</div><div><span style="font-family:arial,sans-serif;font-size:13px"><div>    ierr = DMCreateMatrix(DA2d,  MATMPIAIJ, &LHS_mat); CHKERRQ(ierr);</div>
<div><br></div><div>(The DA2d is a DMDA in two dimensions, with 1 point stencil width, 1 dof, STAR_STENCIL). </div><div>It is a 5-point based discretization of the laplace equation on uniform grid). </div><div><br></div>

</span></div><div class="im">
<div><span style="font-family:arial,sans-serif;font-size:13px">Always send the FULL error message, including the stack trace. </span><br></div></div><div><div class="im"><div>[0]PCSetData_AGG bs=1 MM=11000</div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div>


<div>[0]PETSC ERROR: No support for this operation for this object type!</div><div>[0]PETSC ERROR: Not implemented for A=mpiaij and P=seqaij!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>


<div>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 6, Mon Feb 11 12:26:34 CST 2013 </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><div>[0]PETSC ERROR: ./ex1 on a arch-linu named <a href="http://yoda.mee.ucsb.edu" target="_blank">yoda.mee.ucsb.edu</a> by mmnasr Wed Mar 27 13:12:28 2013</div>


<div>[0]PETSC ERROR: Libraries linked from /home/mmnasr/Softwares/petsc-3.3-p6/arch-linux2-c-debug/lib</div><div>[0]PETSC ERROR: Configure run at Tue Mar 26 14:35:30 2013</div><div>[0]PETSC ERROR: Configure options --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack --download-mpich --download-hypre --download-mumps --download-blacs --download-scalapack --download-ptscotch --with-debuging=0</div>


<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: MatPtAPSymbolic_MPIAIJ() line 81 in src/mat/impls/aij/mpi/mpiptap.c</div><div>[0]PETSC ERROR: MatPtAPSymbolic() line 8362 in src/mat/interface/matrix.c</div>


<div>[0]PETSC ERROR: MatPtAP_Basic() line 12 in src/mat/utils/ptap.c</div><div>[0]PETSC ERROR: MatPtAP() line 8256 in src/mat/interface/matrix.c</div><div>[0]PETSC ERROR: createLevel() line 152 in src/ksp/pc/impls/gamg/gamg.c</div>


<div>[0]PETSC ERROR: PCSetUp_GAMG() line 722 in src/ksp/pc/impls/gamg/gamg.c</div><div>[0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c</div><div>[0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c</div>


<div>[0]PETSC ERROR: KSPSolve() line 402 in src/ksp/ksp/interface/itfunc.c</div><div>[0]PETSC ERROR: main() line 158 in ex1.c</div><div>application called MPI_Abort(MPI_COMM_WORLD, 56) - process 0</div><div>[cli_0]: aborting job:</div>


<div>application called MPI_Abort(MPI_COMM_WORLD, 56) - process 0</div></div><div class="im"><div><br></div><div><br></div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:14px">Can you set up an example that can reproduce?</span><br>


</div></div><div><font face="arial, sans-serif">See attached. </font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks, </font></div><span class="HOEnZb"><font color="#888888"><div>

<font face="arial, sans-serif">Mohamad</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><span style="font-family:arial,sans-serif;font-size:14px"><br></span></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Wed, Mar 27, 2013 at 3:54 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@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"><div dir="ltr">How did you create these matrices? Always send the FULL error message, including the stack trace. Can you set up an example that can reproduce?</div>


<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Mar 27, 2013 at 3:18 PM, Mohamad M. Nasr-Azadani <span dir="ltr"><<a href="mailto:mmnasr@gmail.com" target="_blank">mmnasr@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">Hi, <div><br></div><div>I am trying to use PCGAMG. </div><div>The matrix I have is based on a 2-D DMDA, Laplace equation. </div><div>This is the part of the code I have to setup the solver: </div><div><br>


</div>


<div>KSP solver; </div><div>PC pc; </div><div><div>ierr = KSPCreate(PETSC_COMM_WORLD, &solver);</div></div><div><div>ierr = KSPGetPC(solver, &pc);CHKERRQ(ierr);<br></div><div>ierr = PCSetType(pc, PCGAMG);CHKERRQ(ierr); </div>





</div><div><div>ierr = KSPSetFromOptions(solver); CHKERRQ(ierr);</div><div>ierr = KSPSetOperators(solver, LHS_mat, LHS_mat, SAME_NONZERO_PATTERN); CHKERRQ(ierr);</div></div><div><br></div><div>When I run the code in parallel, it is fine. </div>





<div>But when I run it in serial, this is the error I get: <br></div><div><br></div><div><div>[0]PCSetData_AGG bs=1 MM=11000</div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div>





<div>[0]PETSC ERROR: No support for this operation for this object type!</div><div>[0]PETSC ERROR: Not implemented for A=mpiaij and P=seqaij!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>





<div>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 6, Mon Feb 11 12:26:34 CST 2013 </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><div><br></div><div><br></div><div>Any thoughts? </div>



<span><font color="#888888">

<div><br>Mohamad</div><div><br></div><div><br></div><div><br></div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>