[petsc-dev] Shifting in ICC, changes?
Jed Brown
jed at 59A2.org
Fri Dec 3 14:27:11 CST 2010
On Fri, Dec 3, 2010 at 19:21, Hong Zhang <hzhang at mcs.anl.gov> wrote:
> I recall that I fixed bug in Kernel_A_gets_inverse_A_x(), e.g.
> petsc-release-3.1:
> Kernel_A_gets_inverse_A_4()
> ...
> shift = .25*shift*(PetscAbsScalar(a[0]) + PetscAbsScalar(a[5]) +
> PetscAbsScalar(a[10]) + PetscAbsScalar(a[15]));
>
> petsc-dev:
> shift = .25*shift*(1.e-12 + PetscAbsScalar(a[0]) +
> PetscAbsScalar(a[5]) + PetscAbsScalar(a[10]) + PetscAbsScalar(a[15]));
> ^^^^^^
> Previously, when input shift>0 (i.e., user wants to apply a shift) and
> diag=0, but shift is not applied.
> Adding 1.e-12, shift is applied. However, 'hg log
> src/mat/impls/baij/seq/degfa4.c' does not reveal when this change was
> pushed.
>
Hmm, this does not seem likely. If necessary, I can bisect to find exactly
when the behavior changed.
> I also recall that the shift for sbaij was buggy when 3.1 was
> released, in which shift was applied or not applied incorrectly.
> We (with Shri) spent sometime fixed whatever we found. For icc,
> default MAT_SHIFT_POSITIVE_DEFINITE
> is set (see PCCreate_ICC()) unless user does not want to.
> '-pc_factor_shift_type none' should turn-off shift.
> What do you get when running your code with '-info |grep -i shift'?
> If nothing is displayed, then shift is not applied.
>
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):
[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1,
shift_amount 1.02086e+06
[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1,
shift_amount 61695
[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1,
shift_amount 28112.5
[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1,
shift_amount 33674.7
[0] MatCholeskyFactorNumeric_SeqAIJ(): number of shiftpd tries 1,
shift_amount 33903.1
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.
Could all the old ICC kernels have been somehow buggy? Or did something in
the elimination order change?
Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101203/5028f1a0/attachment.html>
More information about the petsc-dev
mailing list