Skip to content

out of the array bound in SRC/ssytrs_aa.f in LAPACK 3.8.0 #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
collinmines opened this issue Jan 18, 2019 · 10 comments
Closed

out of the array bound in SRC/ssytrs_aa.f in LAPACK 3.8.0 #312

collinmines opened this issue Jan 18, 2019 · 10 comments

Comments

@collinmines
Copy link

I'm installing LAPACK 3.8.0 with GCC (gfortran) 8.2.1. I have added the flag -fcheck=all in the make.inc so I know what happened at runtime, because there are some errors reported by the test code during installation. Run "make all", at the end I got
...
./LIN/xlintsts < stest.in > stest.out 2>&1
make[1]: *** [stest.out] Error 2
make[1]: Leaving directory.`../.../lapack-3.8.0/TESTING'

The beginning part of "stest.out" shows:

At line 216 of file ssytrs_aa.f
Fortran runtime error: Index '2' of dimension 1 of array 'b' above upper bound of 1

Error termination. Backtrace:
#0 0x3fff80d4ddaf in ???
#1 0x3fff80d4f7e7 in ???
#2 0x3fff80d5019b in ???
#3 0x1013d71b in ???
#4 0x1003591f in ???
#5 0x1001a42f in ???
#6 0x10001433 in ???
#7 0x3fff80554bf7 in ???
#8 0x3fff80554e03 in ???
#9 0xffffffffffffffff in ???
Tests of the REAL LAPACK routines
LAPACK VERSION 3.8.0
...

The source code location is ./SRC/ssytrs_aa.f. I believe that in this code (lines 215, 216), when the STRSM is called, the value of LDB is 1, which is in conflict with B( 2,1), because B array is declared as B(LDB, *). So we got the out of bound issue. Can you confirm it?

Thanks!

@collinmines
Copy link
Author

the main routine is TESTING/LIN/schkaa.f for the test exe ./LIN/xlintsts. The schkaa.f calls schksy_aa, which further calls ssytrs_aa. Not sure how the LDB value got initialized or propagates from one to the other. Or maybe a parameter in the input file stest.in is incorrect?

@langou
Copy link
Contributor

langou commented Jan 19, 2019

Hi @collinmines , I contacted @iyamazaki and he is on it. There are a few other fixes in the documentation that he wanted to push. Cheers, @langou .

@collinmines
Copy link
Author

Thanks, @langou . Please let me know when a update is committed to fix these issues so I'll test it.

@iyamazaki
Copy link
Contributor

Thank you for the bug report. Julien merged my pull-request (thank you). Please let me know if there are still issues.

@collinmines
Copy link
Author

Thanks for the updates. Just tested it. I run "git clone ..." and then "git pull" in the lapack directory. Let me know if I'm missing something here to clone the latest version. The gfortran compiler (v8.2.1) flag is the same (-fcheck=all) as before in make.inc. Now, this time it reports something differently. Run "make all", I got:
...
./LIN/xlintsts < stest.in > stest.out 2>&1
make[1]: *** [stest.out] Error 2
make[1]: Leaving directory.`../.../lapack/TESTING'

Now, ./TESTING/stest.out shows:

At line 482 of file slasyf_aa.f
Fortran runtime error: Index '3' of dimension 1 of array 'a' above upper bound of 2
...
Tests of the REAL LAPACK routines
LAPACK VERSION 3.8.0

It complains the other source code in .SRC/slasyf_aa.f, which is different from what I saw before. But still out of array bound issue. Can you please take a look?

@iyamazaki
Copy link
Contributor

I'm sorry for the incomplete pull-request. Julien merged another pull-request. Hopefully, this fixed the problem. Please let me know if you have more issues.

@collinmines
Copy link
Author

Thanks for the updates. Just tested it again this morning.

Now, the source code passed the test with ./LIN/xlintsts, which is good. But it hit the other out of array bound issue in ./EIG/xeigtsts. Below is the detail:

...
./EIG/xeigtsts < se2.in > sse2.out 2>&1
make[1]: *** [sse2.out] Error 2
make[1]: Leaving directory `../lapack/TESTING'
make: *** [lapack_testing] Error 2

The content of sse2.out is:

At line 169 of file slaset.f
Fortran runtime error: Index '2' of dimension 1 of array 'a' above upper bound of 1

Error termination. Backtrace:
#0 0x10000042ddaf in ???
#1 0x10000042f7e7 in ???
#2 0x10000043019b in ???
#3 0x101c9107 in ???
#4 0x1002889b in ???
#5 0x10005a13 in ???
#6 0x10001313 in ???
#7 0x100000764bf7 in ???
#8 0x100000764e03 in ???
#9 0xffffffffffffffff in ???
Tests of the Symmetric Eigenvalue Problem routines

LAPACK VERSION 3.8.0

The following parameter values will be used:
M: 0 1 2 3 5 20
N: 0 1 2 3 5 20
NB: 1 3 3 3 10
NBMIN: 2 2 2 2 2
NX: 1 0 5 9 1

Relative machine underflow is taken to be 0.117549E-37
Relative machine overflow is taken to be 0.340282E+39
Relative machine precision is taken to be 0.596046E-07

Routines pass computational tests if test ratio is less than 50.00
SST routines passed the tests of the error exits (209 tests done)
SE2: NB = 1, NBMIN = 2, NX = 1

Thanks a lot for your time again!
Collin

@iyamazaki
Copy link
Contributor

Since this is in another subroutine, maybe, we can open another issue?

@collinmines
Copy link
Author

Sure and will open a new issue.

@langou
Copy link
Contributor

langou commented Feb 14, 2019

Fixed with #314, #315, and #317
Thanks to @collinmines and @iyamazaki

@langou langou closed this as completed Feb 14, 2019
@julielangou julielangou added this to the LAPACK 3.9.0 milestone Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants