<br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 10:56 AM, Jie Chen <span dir="ltr"><<a href="mailto:jiechen@mcs.anl.gov" target="_blank">jiechen@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">
Oh, in KSPSetTolerances(), the outer_rtol should be the inner_rtol instead... Could you push a fix for me please?<br></blockquote><div><br></div><div><a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/1b7eeaed2630">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/1b7eeaed2630</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Jie<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
----- Original Message -----<br>
From: "Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>><br>
To: "Jie Chen" <<a href="mailto:jiechen@mcs.anl.gov">jiechen@mcs.anl.gov</a>><br>
Cc: "For users of the development version of PETSc" <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>>, "Hong Zhang" <<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>><br>
Sent: Tuesday, August 28, 2012 10:23:00 AM<br>
Subject: Re: Patch review<br>
<br>
I just pushed some fixes for compilation in complex mode<br>
<br>
<a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/49030d6e26f7" target="_blank">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/49030d6e26f7</a><br>
<br>
In the following code, surely you intended to pass inner_rtol to KSPSetTolerances()?<br>
<br>
<br>
PetscErrorCode KSPMonitorDynamicTolerance(KSP ksp,PetscInt its,PetscReal fnorm,void *dummy) {<br>
PetscErrorCode ierr;<br>
PetscReal *coef = (PetscReal*)dummy;<br>
PC pcksp;<br>
KSP kspinner;<br>
PetscReal outer_rtol, outer_abstol, outer_dtol, inner_rtol;<br>
PetscInt outer_maxits;<br>
PetscFunctionBegin;<br>
ierr = KSPGetPC(ksp,&pcksp);CHKERRQ(ierr);<br>
kspinner = NULL;<br>
ierr = PCKSPGetKSP(pcksp,&kspinner);CHKERRQ(ierr);<br>
if (kspinner) {<br>
ierr = KSPGetTolerances(ksp, &outer_rtol, &outer_abstol, &outer_dtol, &outer_maxits);CHKERRQ(ierr);<br>
inner_rtol = (*coef) * outer_rtol / fnorm;<br>
ierr = KSPSetTolerances(kspinner, outer_rtol, outer_abstol, outer_dtol, outer_maxits);CHKERRQ(ierr);<br>
}<br>
PetscFunctionReturn(0);<br>
}<br>
<br>
<br>
<br>
On Fri, Aug 24, 2012 at 6:44 PM, Jed Brown < <a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a> > wrote:<br>
<br>
<br>
<br>
<br>
On Fri, Aug 24, 2012 at 6:38 PM, Jie Chen < <a href="mailto:jiechen@mcs.anl.gov">jiechen@mcs.anl.gov</a> > wrote:<br>
<br>
<br>
I am in fact somewhat reluctant to push out everything before it is formally published and fully tested. The patch consists of more than one algorithmic developments that may be far away from maturity (but they are likely to work), though the authors might be the only ones who care about the new algorithms at this point. Besides, the codes are now full of hacks and lack documentation. I have no problem reverting petsc to the old version temporarily, and I promise I will clean everything to meet the production requirement, although this might not happen in a very short time. Meanwhile I think it also does not hurt to keep the patch as is, as the modification is likely to be used by the author circle only.<br>
<br>
There isn't a problem with experimental code, but if you are going to push experimental code, it should conform to the usual standards. No need to revert the patch unless you've already decided it is a failed experiment.<br>
<br>
<br>
<br>
If something is genuinely useful, we certainly like to have it in our bag of tricks immediately. Waiting until a paper is published to put it in the repo just means that it will take longer to find use in real applications. As far as I'm concerned, an ideal scenario is that by the time someone reads the paper, they already have the functionality in a released version of PETSc, thus can experiment on their own problems without even recompiling. (This being the lowest possible effort, it maximizes the chances of finding other applications where the method is useful, thus maximizing citations, in case that is the metric you care about.)<br>
</div></div></blockquote></div><br>