Hi, I am trying to use PCGAMG. The matrix I have is based on a 2-D DMDA, Laplace equation. This is the part of the code I have to setup the solver:
KSP solver; PC pc; ierr = KSPCreate(PETSC_COMM_WORLD, &solver); ierr = KSPGetPC(solver, &pc);CHKERRQ(ierr); ierr = PCSetType(pc, PCGAMG);CHKERRQ(ierr); ierr = KSPSetFromOptions(solver); CHKERRQ(ierr); ierr = KSPSetOperators(solver, LHS_mat, LHS_mat, SAME_NONZERO_PATTERN); CHKERRQ(ierr); When I run the code in parallel, it is fine. But when I run it in serial, this is the error I get: [0]PCSetData_AGG bs=1 MM=11000 [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: No support for this operation for this object type! [0]PETSC ERROR: Not implemented for A=mpiaij and P=seqaij! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 6, Mon Feb 11 12:26:34 CST 2013 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ Any thoughts? Mohamad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130327/9fbb0344/attachment.html>
