Skip to content
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

Provides LAPACK.stein!() and hooks in SymTridiagonal #2678

Merged
merged 2 commits into from
Mar 26, 2013
Merged

Provides LAPACK.stein!() and hooks in SymTridiagonal #2678

merged 2 commits into from
Mar 26, 2013

Conversation

jiahao
Copy link
Member

@jiahao jiahao commented Mar 25, 2013

Squashes and cleans up commits from #2654 to date.

Provides eigvecs() methods to return just the eigenvectors

in lapack.jl:
Changed LapackException to LAPACKException
Changed LapackDimMisMatch to DimensionMismatch

in tridiag.jl:
new eigvec method() to return just eigenvectors
optionally takes eigenvalues to return corresponding eigenvectors
@ViralBShah
Copy link
Member

Thanks. Do we know why this is failing? Is it the stebz thing?

@jiahao
Copy link
Member Author

jiahao commented Mar 25, 2013

Summary to date: the test fails because _stein in LAPACK throws a -6 error, which I think means it doesn't like the iblock input to it. iblock is supposed to be returned from _stebz and says something about the subspace of the matrix the desired eigenvectors reside. I have two variants of stein! which either accepts iblock input or creates iblock manually to tell _stein to look in the entire vector space spanned by the matrix. There are two tests testing each variant. Both of them currently fail with the same error. On x86_64/OpenBLAS and OSX 10.8.3/OpenBLAS this error doesn't occur. @andreasnoackjensen has observed this error with MKL so this appears to be a MKL-specific issue?

@ViralBShah
Copy link
Member

If this is one of those travis-only errors, we may need to comment out the tests - or else every single build will fail. I will take a look too.

@ViralBShah
Copy link
Member

It seems that stein expects iblock to be of size n, but stebz is returning iblock[1:m[1]]. Could that be a problem?

@jiahao
Copy link
Member Author

jiahao commented Mar 25, 2013

I don't think so. In lapack.jl:1427 iblock_in is explicitly padded with zeroes to become of length n.

@andreasnoack
Copy link
Member

@ViralBShah It is related to 32 bit LAPACK. I have just tried this branch on julia.mit.edu with USE_LIB64 = 0 and there I get the error.

@jiahao
Copy link
Member Author

jiahao commented Mar 26, 2013

@andreasnoackjensen how did you get a 32-bit compile on julia.mit.edu? I tried this with make USE_LIB64=0 but it keeps wanting to compile 64-bit objects.

I am beginning to wonder if the problem might be iblock being declared as an array of Int64 even for the 32-bit platform, and if this can be fixed by explicitly declaring iblock and isplit as Array(BlasInt,n) and then populating its entries explicitly rather than with the concatenations in linalg.jl:1424-33.

@ViralBShah
Copy link
Member

In all the BLAS and LAPACK wrappers, you should always use BlasInt.

@andreasnoack
Copy link
Member

@jiahao You'll need to delete the dynlibs in deps/openblas* for USE_LIB64=0 to have effect.

@andreasnoack
Copy link
Member

@jiahao You were right about the declaration of the variables. By defining iblock=[ones(BlasInt, m), Array(BlasInt,n-m)] the error disappears. If you change that line, hopefully the Travis tests will pass and your branch can be merged. However, we are having a very open issue in #1804.

@jiahao
Copy link
Member Author

jiahao commented Mar 26, 2013

We have finally trapped the hideous beast which has been so hard to capture these past few days.

@jiahao
Copy link
Member Author

jiahao commented Mar 26, 2013

@ViralBShah the error was in assuming that concatenation would return an array of the correct BlasInt type.

ViralBShah added a commit that referenced this pull request Mar 26, 2013
Provides LAPACK.stein!() and hooks in SymTridiagonal
@ViralBShah ViralBShah merged commit e722a20 into JuliaLang:master Mar 26, 2013
@ViralBShah
Copy link
Member

Thanks for persisting through with this one.

@jiahao jiahao deleted the stein2 branch March 26, 2013 16:45
@jiahao jiahao mentioned this pull request Apr 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants