bugGNU Octave - Bugs: bug #53589, Failing BIST test in bicg

 
 

bug #53589: Failing BIST test in bicg

Submitter:  Marco Caliari <caliari>
Submitted:  Mon 09 Apr 2018 08:43:25 AM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.3.90 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 11 Apr 2018 12:17:11 AM UTC, comment #5: 

I checked in the cset here (http://hg.savannah.gnu.org/hgweb/octave/rev/b3ee0179d7b0).  Note that I changed division statements to use the in-place versions which are faster.


alpha = alpha / prod_qv;
==>
alpha ./= prod_qv;


I also changed the documentation for flag 4 to be in the past tense to match the other flags.


## @item 4: The algorithm could not continue because intermediate values
## became too small or too large for reliable computation.


For the BIST tests, I note that only one of the conditions for flag 4 is checked.  It is this one


     if (abs (prod_qv) <= eps * abs (alpha))
       flag = 4;
       break
     endif


It would be nice if there was another BIST test which exercised the second bit of code which sets flag to 4.


    beta = s0' * prec_r0;
    if (abs (prod_rs) <= abs (beta))
      flag = 4;
      break;
    endif


Nevertheless, marking as fixed and closing report.

Rik <rik5>
Group administrator
Tue 10 Apr 2018 06:43:21 AM UTC, comment #4: 

@Dmitri: yes, it is blas dependent. I see the problem only with openblas, not with atlas or reference.

The problem is quite easy to solve, but there is a choice to make: in the code there are a couple of denominators. The current code breaks with flag = 4 only if the denominators are exactly zero. The other possibily would be to break if the denominators are eps times smaller than the numerators (for instance). In the first case, you may have false positive results (the code runs until max number of iterations). In the second case, you may have false negative results (the code breaks iterations that would have converged). From Matlab documentation, it seems that the second approach is used. I attach a patch which implements the second approach.

(file #43864)

Marco Caliari <caliari>
Group Member
Mon 09 Apr 2018 05:17:14 PM UTC, comment #3: 

I get those errors with atlas, but not with openblas.


LD_PRELOAD=/usr/lib64/atlas/libtatlas.so ./run-octave
test ('bicg')
***** test
 ## If A singular, the algorithm doesn't work due to division by zero
 A = ones (5);
 b = [1:5]';
 [x, flag] = bicg (A, b);
 assert (flag, 4);
!!!!! test failed
ASSERT errors for:  assert (flag,4)

  Location  |  Observed  |  Expected  |  Reason
     ()           1            4         Abs err 3 exceeds tol 0 by 3


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 09 Apr 2018 04:19:39 PM UTC, comment #2: 

At least on my system, there don't appear to be any failures.

I ran


for i = 1:100
bm(i) = test ('bicg');
endfor
sum (bm)


and got 100 succesful tests.

Rik <rik5>
Group administrator
Mon 09 Apr 2018 03:24:43 PM UTC, comment #1: 

Marking bug as in progress and changing the version number to 4.3.90 (release candidate for 4.4.0).

Rik <rik5>
Group administrator
Mon 09 Apr 2018 08:43:25 AM UTC, original submission:  

The test named ## If A singular [...] fails for me. The quantity prod_qv, supposed to be zero for the test, is instead 1e-31. Therefore, the algorithm does not stop with flag=4. I'm working with Cristiano in order to solve it.

Marco Caliari <caliari>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #43864:  bicg.m.diff added by caliari (2KiB - application/x-tex)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by caliari (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-11 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2018-04-10 caliari Attached File- Added bicg.m.diff, #43864
        StatusIn Progress Patch Submitted
    2018-04-09 rik5 StatusNone In Progress
        Release4.4.0 4.3.90

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code