Bug report: out-of-bounds in ILADLC, ILADLR, ILAZLC, ILAZLR

Open discussion regarding features, bugs, issues, vendors, etc.

Bug report: out-of-bounds in ILADLC, ILADLR, ILAZLC, ILAZLR

Postby mat_cross » Sat Aug 14, 2010 5:15 am

In these four routines the 'quick return' logical test, e.g.
Code: Select all
IF( N.EQ.0 .OR. A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO )
in ILADLC, needs to be split into two:
Code: Select all
IF( N.EQ.0 )
and
Code: Select all
IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO )
since logical expressions can be evaluated in any order in Fortran.
mat_cross
 
Posts: 6
Joined: Mon Aug 17, 2009 7:42 am

Re: Bug report: out-of-bounds in ILADLC, ILADLR, ILAZLC, ILAZLR

Postby Julien Langou » Sun Aug 15, 2010 1:03 pm

Hi Mathew,

You are entirely right, the LAPACK codes were not correct, we corrected this in 3.2.1. (See: http://www.netlib.org/lapack/lapack-3.2.1.html, bug 002, svn r610 and svn r614).

Cheers,
Julien.
Julien Langou
 
Posts: 727
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Re: Bug report: out-of-bounds in ILADLC, ILADLR, ILAZLC, ILAZLR

Postby jteg68 » Tue Aug 17, 2010 12:58 am

Hi,

two comments:
shouldn't the test for N=0 be N<=0 instead?
shouldn't the code indicate an error in case N<=0? Now it returns the index of the last row/column and any buggy calling code will happily chug along instead of aborting.

/Jörgen
jteg68
 
Posts: 9
Joined: Wed Sep 02, 2009 8:18 am

Re: Bug report: out-of-bounds in ILADLC, ILADLR, ILAZLC, ILAZLR

Postby Julien Langou » Tue Aug 17, 2010 10:28 am

Thanks for the comment. These subroutines (ILACLC,ILACLR, ILADLC,ILADLR,ILASLC,ILASLR,ILAZLC and ILAZLR) are LAPACK auxiliary subroutines. Therefore, as LAPACK auxiliary subroutines, they do not have any check on their arguments. For ILADLC, (( M>=0 ) .AND. ( N >= 0 ) .AND. ( LDA >= MAX( 1, N) ) ) is required for the subroutine to work properly but we do not check it. Julien.
Julien Langou
 
Posts: 727
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Re: Bug report: out-of-bounds in ILADLC, ILADLR, ILAZLC, ILAZLR

Postby mat_cross » Tue Aug 17, 2010 2:23 pm

Thanks guys: sorry for the duplicate. I picked up my source from http://www.netlib.org/lapack/lapack-3.2/SRC/ilazlc.f (via Google) and wrongly assumed that was the latest version.
I also see from the Google search that the third hit is the original discussion about the bug from a few years ago!
mat_cross
 
Posts: 6
Joined: Mon Aug 17, 2009 7:42 am


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest