Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

It is a bug of lapack 3.2 or of gfortran ?

36 views
Skip to first unread message

hes selex

unread,
Dec 18, 2008, 11:20:50 PM12/18/08
to
my make.inc :

FORTRAN = gfortran
LOADER = $(FORTRAN)
OPTS = -fbounds-check
DRVOPTS = $(OPTS)
NOOPT =
LOADOPTS = -fbounds-check

when make lapack_testing (after make blaslib ,make lib),
$./xlintsts < stest.in > stest.out
At line 47 of file ilaslr.f
Fortran runtime error: Array reference out of bounds for array 'a',
lower bound of dimension 1 exceeded (0 < 1)

Tim Prince

unread,
Dec 19, 2008, 2:18:28 AM12/19/08
to

47: IF( M.EQ.0 .OR. A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN
48: ILASLR = M
49: ELSE
must be changed to something like
47: IF( M == 0 ) THEN
48: ILASLR = M
48a: ELSEIF( A(M, 1) /= ZERO .OR. A(M, N) /= ZERO ) THEN
48b: ILASLR = M
49: ELSE
in order to comply with standard. If this were translated by f2c, it
would be correct C, but Fortran doesn't have a shortcut rule like C for
compound logical expressions. It is entirely legitimate for a compiler to
evaluate each part of the logical expression simultaneously, so as to
speed it up, producing the reported violation.

Julien Langou

unread,
Dec 19, 2008, 12:04:19 PM12/19/08
to
Thanks a lots for the information. We will patch LAPACK accordingly
and release the new version promptly.
Best wishes, Julien Langou.
0 new messages