[petsc-users] MatGetRowMinAbs returns negative number

Dominik Szczerba dominik at itis.ethz.ch
Thu Jan 5 04:07:40 CST 2012


Is it also possible that MaxAbs would be computed wrongly? I get a
different value when I compute it myself.

Dominik

On Thu, Jan 5, 2012 at 1:02 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> On Jan 4, 2012, at 5:42 PM, Matthew Knepley wrote:
>
>> On Wed, Jan 4, 2012 at 5:29 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
>> Do you think this issue can potentially explain a behavior I observe:
>>
>> In my big block shell matrix there are two blocks submatrices: (say) B
>> and B transposed. MaxAbs is exact same for both submatrices, MinAbs is
>> zero for B (as expected), but small negative for the other
>> (unexpected).
>>
>> Now question: do I have a bug (that I do not immediately see) or this
>> can be hopefully only a trick in MinAbs?
>>
>> It was a bug in MinAbs. I am pushing the fix.
>
>    To 3.2 I hope. Please send the patch link for 3.2 as Satish did just a little while ago for another bug.
>
>   Barry
>
>>
>>    Matt
>>
>> Thanks a lot.
>>
>> On Wed, Jan 4, 2012 at 6:05 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>> > On Wed, Jan 4, 2012 at 11:02, Matthew Knepley <knepley at gmail.com> wrote:
>> >>
>> >> Okay, here is what is wrong with the logic:
>> >>
>> >> 1) Its not a shift, it ignores values < 1.0e-12
>> >
>> >
>> > you wrote that in the commit message
>> >
>> >>
>> >>
>> >> 2) The problem is on line 2.17 of the diff where it takes the first value
>> >> as minimum, but does not take the absolute value
>> >
>> >
>> > good catch
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>


More information about the petsc-users mailing list