[Jprogramming] Problem with sparse tridiagonal solver
Henry Rich
henryhrich at gmail.com
Fri Jul 27 19:12:51 UTC 2018
Not a problem for the guy who doesn't have to code it! :) It would
require row and column exchanges to change the pivot, which I'm guessing
is more work than Roger wanted to put into it.
But it IS misdiagnosed: domain error should mean the input is invalid,
while nonce error means the input is valid but unsupported by the
current code.
Henry Rich
On 7/27/2018 3:08 PM, Bill Heagy wrote:
> Sorry, when I said "misdiagnosed", I meant that it was detecting a
> problem that wasn't actually there, not giving the wrong message.
> Starting with a zero shouldn't be a problem.
>
> On 2018-07-27 02:57 PM, Henry Rich wrote:
>> You're right that it should be diagnosed as a nonce error rather than
>> a domain error. If you try to invert a sparse matrix with a 0 in the
>> top-left, you get a nonce error. The code just doesn't handle the
>> case of starting with a 0.
>>
>> I would change the error to nonce error, but that doesn't fix the
>> testcase, and I don't think it's worth any effort to fix this bug in
>> the solver.
>>
>> Henry Rich
>>
>> On 7/27/2018 2:49 PM, Bill Heagy wrote:
>>> Most of the time, the test works. It's only if you run it
>>> repeatedly, until there's a (random) zero in the (0,0) position,
>>> that it fails. It looks like a misdiagnosed problem, or a problem
>>> with initializing the solution.
>>>
>>> On 2018-07-27 02:43 PM, Raul Miller wrote:
>>>> Which suggests that maybe this is diagnosing an api handling issue?
>>>>
>>>> (If the test used to work, x and y somehow got flipped?)
>>>>
>>>> Thanks,
>>>>
>>> On Fri, Jul 27, 2018 at 2:37 PM Bill Heagy <wheagy at bell.net> wrote:
>>> >
>>> > If you just take the x and y and flip them so the 0 is in the bottom
>>> > right, it appears to work. It fits the domain.
>>> >
>>> > On 2018-07-27 02:24 PM, Henry Rich wrote:
>>> >> Right again. The sparse matrix divide is very restricted in
>>> domain and
>>> >> I am not going to be the one to try to improve it. Maybe I can
>>> tweak the
>>> >> testcase.
>>> >>
>>> >> Henry Rich
>>> >>
>>> >> On 7/27/2018 1:48 PM, Bill Heagy wrote:
>>> >>> Running gsp1 repeatedly produces:
>>> >>>
>>> >>> ...
>>> >>> 1e_13 >. >./ | (y=: h 11) (%. -: (%.$.)) x=: 0.01*g 11
>>> >>> |domain error
>>> >>> | 1e_13>.>./|(y=:h 11) (%.-:(%.$.))x=:0.01*g 11
>>> >>> |[-37] /home/wheagy/git/jsource/test/gsp1.ijs
>>> >>>
>>> >>> at various locations.
>>> >>> The problem appears to be a "0" in the (0,0) position in the x
>>> matrix.
>>> >>> JVERSION Engine: j806/j32/linux
>>> >>> Beta: GPL3/2018-07-25T05:05:57
>>> >>> Library: 8.05.14
>>> >>> Platform: Linux 32
>>> >>> Installer: unknown
>>> >>> InstallPath: /home/wheagy/tmp/jbld/j32
>>> >>> Contact: wheagy at bell.net
>>> >>>
>>> ----------------------------------------------------------------------
>>> >>> For information about J forums see
>>> http://www.jsoftware.com/forums.htm
>>> >>
>>> >>
>>> >> ---
>>> >> This email has been checked for viruses by AVG.
>>> >> https://www.avg.com
>>> >>
>>> >>
>>> ----------------------------------------------------------------------
>>> >> For information about J forums see
>>> http://www.jsoftware.com/forums.htm
>>> >
>>> ----------------------------------------------------------------------
>>> > For information about J forums see
>>> http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list