bugGNU Octave - Bugs: bug #36568, wrong flag returned by gmres

 
 

bug #36568: wrong flag returned by gmres

Submitted by:  Gerard BURNSIDE <gerardburnside>
Submitted on:  Thu 31 May 2012 03:20:47 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.1Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 15 Jun 2012 05:16:30 PM UTC, comment #1:

I pushed a patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/5c269b73f467) which fixes this issue and also some others with gmres(). To access the fix you will need to build from Mercurial sources or wait until the next stable release (3.8.0). Thanks for noticing this.

Rik <rik5>
Project Administrator
Thu 31 May 2012 03:20:47 PM UTC, original submission:

While checking out the samples for gmres and bicgstab, I noticed that gmres returned a flag 1 (max num iterations reached) where I expected it to return a flag 0 (converged).

Looking at gmres.m it seems that you just need to change the inequality after the while loop from:

if (presn > rtol * prec_b_norm)
flag = 0;

to:

if (presn <= rtol * prec_b_norm)
flag = 0;

(by default the flag is initializd to 1).

Gerard BURNSIDE <gerardburnside>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by gerardburnside (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Jun 2012 05:16:30 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1