<div class="gmail_quote">On Fri, Dec 3, 2010 at 19:21, Hong Zhang <span dir="ltr"><<a href="mailto:hzhang@mcs.anl.gov">hzhang@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;">
<div id=":1b">I recall that I fixed bug in Kernel_A_gets_inverse_A_x(), e.g.<br>
petsc-release-3.1:<br>
Kernel_A_gets_inverse_A_4()<br>
...<br>
shift = .25*shift*(PetscAbsScalar(a[0]) + PetscAbsScalar(a[5]) +<br>
PetscAbsScalar(a[10]) + PetscAbsScalar(a[15]));<br>
<br>
petsc-dev:<br>
shift = .25*shift*(1.e-12 + PetscAbsScalar(a[0]) +<br>
PetscAbsScalar(a[5]) + PetscAbsScalar(a[10]) + PetscAbsScalar(a[15]));<br>
^^^^^^<br>
Previously, when input shift>0 (i.e., user wants to apply a shift) and<br>
diag=0, but shift is not applied.<br>
Adding 1.e-12, shift is applied. However, 'hg log<br>
src/mat/impls/baij/seq/degfa4.c' does not reveal when this change was<br>
pushed.<br></div></blockquote><div><br></div><div>Hmm, this does not seem likely. If necessary, I can bisect to find exactly when the behavior changed. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1b">
I also recall that the shift for sbaij was buggy when 3.1 was<br>
released, in which shift was applied or not applied incorrectly.<br>
We (with Shri) spent sometime fixed whatever we found. For icc,<br>
default MAT_SHIFT_POSITIVE_DEFINITE<br>
is set (see PCCreate_ICC()) unless user does not want to.<br>
'-pc_factor_shift_type none' should turn-off shift.<br>
What do you get when running your code with '-info |grep -i shift'?<br>
If nothing is displayed, then shift is not applied.</div></blockquote></div><div><br></div>With the version from Feb 1, I get (using AIJ since SBAIJ had no shift logic at that time and just proceeded with negative pivots):<div>
<br><div><div>[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1, shift_amount 1.02086e+06</div><div>[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1, shift_amount 61695</div><div>[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1, shift_amount 28112.5</div>
<div>[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1, shift_amount 33674.7</div><div>[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1, shift_amount 33903.1</div></div><div><br></div></div>
<div>When I ran this with SBAIJ at that time, the iteration count blew out because the factors were garbage (having used negative pivots). When I run the same exact thing now, I get no output. The iteration counts are identical with AIJ and SBAIJ.</div>
<div><br></div><div>Could all the old ICC kernels have been somehow buggy? Or did something in the elimination order change?</div><div><br></div><div>Jed</div>