<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.6.6">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I commented out the following lines in src/ksp/pc/impls/mg/mg.c<BR>
<BR>
if (!lu && !redundant && !cholesky && !svd && !bjaclu) {<BR>
ierr = KSPSetType(mglevels[0]->smoothd,KSPGMRES);CHKERRQ(ierr);<BR>
}<BR>
<BR>
Now the coarse KSP is set to the value given via -mg_coarse_ksp_type and not to GMRES by default. <BR>
Is it safe to remove the above lines or it may create problems somewhere else?<BR>
<BR>
Thanks,<BR>
Michele<BR>
<BR>
On Sun, 2015-07-19 at 10:33 -0400, Mark Adams wrote:
<BLOCKQUOTE TYPE=CITE>
This was fixed on June 18 (Stephen Kramer):
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
Can you please test this and see if works, without your fix?<BR>
<BR>
'git fetch; git checkout mark/gamg-crs',<BR>
</BLOCKQUOTE>
<BR>
Great! That fixes everything for me: it uses KSP+PREONLY for mg_coarse by default again and I can also override it with -mg_coarse_ksp_type<BR>
<BR>
Thanks a lot for fixing this<BR>
Cheers<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
This was soon merged to master & next. In src/ksp/pc/impls/mg/mg.c we have:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
ierr = PetscObjectTypeCompare((PetscObject)cpc,PCLU,&lu);CHKERRQ(ierr);
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
ierr = PetscObjectTypeCompare((PetscObject)cpc,PCREDUNDANT,&redundant);CHKERRQ(ierr);
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
ierr = PetscObjectTypeCompare((PetscObject)cpc,PCCHOLESKY,&cholesky);CHKERRQ(ierr);
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
ierr = PetscObjectTypeCompare((PetscObject)cpc,PCSVD,&svd);CHKERRQ(ierr);
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
if (!lu && !redundant && !cholesky && !svd && !bjaclu) {
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
ierr = KSPSetType(mglevels[0]->smoothd,KSPGMRES);CHKERRQ(ierr);
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
}
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Perhaps our logic is failing here? This is the only place where GMRES spontaneously appears. We should really remove this altogether.
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
On Sat, Jul 18, 2015 at 11:40 PM, Matthew Knepley <<A HREF="mailto:knepley@gmail.com">knepley@gmail.com</A>> wrote:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
On Sat, Jul 18, 2015 at 10:31 PM, Michele Rosso <<A HREF="mailto:mrosso@uci.edu">mrosso@uci.edu</A>> wrote:
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BLOCKQUOTE>
Matt,<BR>
<BR>
please find the log_summary attached.<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
Okay, it is running master. Barry, where should he look in the code to see why its still changing,
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
meaning what changeset fixed this?
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
Thanks,
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
Matt
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BLOCKQUOTE>
Michele
</BLOCKQUOTE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BR>
<BR>
On Sat, 2015-07-18 at 21:56 -0500, Matthew Knepley wrote: <BR>
<BLOCKQUOTE TYPE=CITE>
On Sat, Jul 18, 2015 at 9:53 PM, Michele Rosso <<A HREF="mailto:mrosso@uci.edu">mrosso@uci.edu</A>> wrote:<BR>
<BLOCKQUOTE>
Barry,<BR>
<BR>
I tried the master branch of PETSc as you suggested and unfortunately the problem with KSP being set to GMRES on the coarse level when using "-mg_coarse_ksp_type preonly" is still there. I attached the output from ksp view and the options stack.<BR>
Am I missing something?<BR>
<BR>
</BLOCKQUOTE>
<BR>
<BR>
If you show output from -log_summary we can make sure you are running the version we expect.<BR>
<BR>
<BR>
Thanks,<BR>
<BR>
<BR>
Matt<BR>
<BR>
<BLOCKQUOTE>
Thanks,<BR>
Michele<BR>
<BR>
<BR>
On Thu, 2015-07-16 at 17:30 -0500, Barry Smith wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Michel,
This is a very annoying feature that has been fixed in master <A HREF="http://www.mcs.anl.gov/petsc/developers/index.html">http://www.mcs.anl.gov/petsc/developers/index.html</A> I would like to have changed it in maint but Jed would have a shit-fit :-) since it changes behavior.
Barry
<FONT COLOR="#737373">> On Jul 16, 2015, at 4:53 PM, Michele Rosso <<A HREF="mailto:mrosso@uci.edu">mrosso@uci.edu</A>> wrote:</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> Hi,</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> I am performing a series of solves inside a loop. The matrix for each solve changes but not enough to justify a rebuilt of the PC at each solve.</FONT>
<FONT COLOR="#737373">> Therefore I am using KSPSetReusePreconditioner to avoid rebuilding unless necessary. The solver is CG + MG with a custom PC at the coarse level.</FONT>
<FONT COLOR="#737373">> If KSP is not updated each time, everything works as it is supposed to. </FONT>
<FONT COLOR="#737373">> When instead I allow the default PETSc behavior, i.e. updating PC every time the matrix changes, the coarse level KSP , initially set to PREONLY, is changed into GMRES </FONT>
<FONT COLOR="#737373">> after the first solve. I am not sure where the problem lies (my PC or PETSc), so I would like to have your opinion on this.</FONT>
<FONT COLOR="#737373">> I attached the ksp_view for the 2 successive solve and the options stack.</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> Thanks for your help,</FONT>
<FONT COLOR="#737373">> Michel</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> <ksp_view.txt><petsc_options.txt></FONT>
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
<BR>
<BR>
<BR>
<BR>
<FONT COLOR="#888888">-- </FONT><BR>
<FONT COLOR="#888888">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.</FONT><BR>
<FONT COLOR="#888888">-- Norbert Wiener</FONT><BR>
</BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
--
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
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
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>