<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 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 class="HOEnZb"><font color="#888888">
<div><br>Mohamad</div><div><br></div><div><br></div><div><br></div></font></span></div>
</blockquote></div><br></div>