-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
linalg test fails with Fedora 19 system LAPACK #5050
Comments
This one looks like a 32/64 bit library mix error. Probably the system LAPACK and BLAS are 32 bit so you'll have to recompile julia with USE_BLAS64=0. |
Perhaps we should emit a more helpful error message here. Perhaps putting something like
somewhere in |
That seems a bit excessive, even if it were possible. We do need a way to detect this though. Is there a way we can call a generic LAPACK routine to detect this (perhaps a trick?) during julia initialisation? That said, it is preferable to use Julia's provided BLAS and LAPACK libraries, as we track these a lot more carefully for bugs and apply patches compared with the versions that ship in linux distros. |
How about we intentionally pass a large argument to an LAPACK routine during initialisation, and check the LAPACKException? |
Actually that's a good point. It's better to check during startup. We can do something very simple to throw an error like ask to Cholesky factor [1 0; 0 -1], which should fail with error code +2, then check if the error code is bit-shifted 32 places. You don't even need to catch an Exception, simply check the info code. |
Ah, I had missed the possibility of a 32/64 bits discrepancy. Indeed, with USE_BLAS64=0, this works. This is weird because I do not have any 32-bit BLAS or LAPACK installed:
See https://gist.github.com/nalimilan/7858024 for the output of Julia with LD_DEBUG=files. |
The terminology is confusing. When we talk of 32-bit BLAS, we are referring to a BLAS compiled with integers being 32-bit wide inside the BLAS library. This is usually the default on all platforms. In Julia, we compile our BLAS and LAPACK to support 64-bit integer values for sizes of arrays and such on 64-bit architectures. Thus, even though your libraries are built on a 64-bit architecture, they are still using 32-bit integer values internally. |
Indeed, this was confusing. ;-) Again, a short word in README.md would greatly help. So I'm going to keep using |
@nalimilan this isn't really the documentation you want, but the list of makevars I pass into Ubuntu builds is here, which includes things like |
I have added some explanation of USE_BLAS64 in DISTRIBUTING.md. We should also put in the check that @jiahao suggested, as that will ensure that a clear error message is issued on startup. That should then suffice to close this issue. |
I think we can close this issue now given the build-time check and documentation. |
@staticfloat But even in your list, USE_SYSTEM_LIGHTTPD, USE_SYSTEM_ZLIB and USE_QUIET do not seem to be used anywhere in the current code base. Thanks for the pointer, though, I've taken LIBBLASNAME so that openblas is used. Nice fix! |
@nalimilan Aha, yes indeed. Those used to be used, but don't do anything anymore. We don't ship with |
Another failing test with the system Fedora 19 libraries. LAPACK is the classic Netlib one, version 3.4.2 (the same Julia would normally download). The error message is not quite obvious, but of course I can run more tests if needed.
The text was updated successfully, but these errors were encountered: