<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Ubuntu">I noticed that the problem appears</font> even
if I use CG with the default preconditioner: commenting KSPSetDM()
solves the problem.<br>
So basically without a proper grid (it seems no grid with an even
numbers of nodes qualifies) and with my own system matrix, I cannot
use any type of multigrid <br>
pre-conditioner?<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 05/17/2013 05:33 PM, Jed Brown
wrote:<br>
</div>
<blockquote cite="mid:87k3mxm8is.fsf@mcs.anl.gov" type="cite">
<pre wrap="">Michele Rosso <a class="moz-txt-link-rfc2396E" href="mailto:mrosso@uci.edu"><mrosso@uci.edu></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">I run with
-pc_type gamg -options_left
and I get the error:
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: No support for this operation for this object type!
[0]PETSC ERROR: For coloring efficiency ensure number of grid points in
X is divisible
by 2*stencil_width + 1
!
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29
11:26:24 CDT 2012
[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:
------------------------------------------------------------------------
[0]PETSC ERROR: ./hit on a named nid22318 by Unknown Fri May 17
19:21:25 2013
[0]PETSC ERROR: Libraries linked from
[0]PETSC ERROR: Configure run at
[0]PETSC ERROR: Configure options
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: DMCreateColoring_DA_3d_MPIAIJ() line 288 in
src/dm/impls/da/fdda.c
</pre>
</blockquote>
<pre wrap="">
You didn't provide a Jacobian. A finite difference Jacobian is mostly
used for initial development. For more general problems, either
assemble the Jacobian or choose a compatible grid.
Note: this message is a consequence of using periodic boundary
conditions. Someone cut a corner a long time ago when implementing
coloring for periodic and nobody has needed this enough to remove the
assumption. A dimension of 255 would also be divisible by 3, if it
helps you.
if (bx == DMDA_BOUNDARY_PERIODIC && (m % col)) SETERRQ(PetscObjectComm((PetscObject)da),PETSC_ERR_SUP,"For coloring efficiency ensure number of grid points in X is divisible\n\
by 2*stencil_width + 1\n");
</pre>
<blockquote type="cite">
<pre wrap="">[0]PETSC ERROR: DMCreateColoring_DA() line 172 in src/dm/impls/da/fdda.c
[0]PETSC ERROR: DMCreateColoring() line 709 in src/dm/interface/dm.c
[0]PETSC ERROR: DMComputeJacobian() line 2206 in src/dm/interface/dm.c
[0]PETSC ERROR: KSPSetUp() line 228 in src/ksp/ksp/interface/itfunc.c
</pre>
</blockquote>
<pre wrap="">
Looks like you cut the error message off short.
</pre>
<blockquote type="cite">
<pre wrap="">The code is calling
KSPSetFromOptions()
On 05/17/2013 05:10 PM, Jed Brown wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Please always use "reply-all" so that your messages go to the list.
This is standard mailing list etiquette. It is important to preserve
threading for people who find this discussion later and so that we do
not waste our time re-answering the same questions that have already
been answered in private side-conversations. You'll likely get an
answer faster that way too.
Michele Rosso <a class="moz-txt-link-rfc2396E" href="mailto:mrosso@uci.edu"><mrosso@uci.edu></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">If you are referring to -pc_type gamg, I tried it, but I got the same
error message
(For coloring efficiency ensure number of grid points in X is divisible
by 2*stencil_width + 1)
</pre>
</blockquote>
<pre wrap="">The option could not have been used. Always send the ENTIRE error
message. Is the code calling KSPSetFromOptions()? Run with
-options_left to see if any options did not get used.
</pre>
<blockquote type="cite">
<pre wrap="">On 05/17/2013 04:49 PM, Jed Brown wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Read my first message
On May 17, 2013 6:47 PM, "Michele Rosso" <<a class="moz-txt-link-abbreviated" href="mailto:mrosso@uci.edu">mrosso@uci.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:mrosso@uci.edu"><mailto:mrosso@uci.edu></a>> wrote:
Ok, I will give a try to AMG then. What is it exactly?
Thank you!
On 05/17/2013 04:25 PM, Jed Brown wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> Michele Rosso<a class="moz-txt-link-rfc2396E" href="mailto:mrosso@uci.edu"><mrosso@uci.edu></a> <a class="moz-txt-link-rfc2396E" href="mailto:mrosso@uci.edu"><mailto:mrosso@uci.edu></a> writes:
</pre>
<blockquote type="cite">
<pre wrap=""> So should I always use an odd number of grid points?
There is no way around this?
</pre>
</blockquote>
<pre wrap=""> If you want to use regular geometric coarsening, then yes. That *is*
regular node-centered coarsening. Just consider the base case of one
element:
o ------- o
Split that in two:
o -- o -- o
Look, an odd number of vertices, and as we keep refining, it will stay
odd.
You can use AMG or write your own interpolation if you want irregular coarsening.
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>