-
-
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
32bit OpenBLAS build with 64bit Julia by default on OSX 10.6.8 #3838
Comments
I'm not certain whether or not that fixes it, or how much you will need to delete to get into a consistent state (maybe just openblas), but I was able to ascertain that openblas expected the compiler name ( |
OpenBLAS has problems with |
Perhaps we switch to using system blas by default on 10.6 as we used to. |
sigh, upstream bug opened: OpenMathLib/OpenBLAS#265 so that we can revert cbd9c3d once that is closed |
I think this can be solved by the suggestion of @ViralBShah: revert to using system BLAS in 10.6. It's a minority platform anyhow that will eventually be phased out. |
Can you post the contents of |
OK, I just rechecked (pulled, recompiled without Make.user) and it seemed to work. julia> versioninfo() I doubt you want to see the openblas config now, but let me know if you do. |
oh, i guess not then. it seems it was working all along then? |
Ugh, sorry for the noise. Seems it was a problem with the environment that I missed ruling out. [nibbler julia]% LD_LIBRARY_PATH="/opt/local/lib" ./julia The culprit appears to be something in /opt/local/lib (MacPorts) but there is no OpenBLAS there (I checked for other libraries using locate, find, etc initially). The only BLAS in there that I see is libgslcblas. I'm trying to find the OSX equivalent of strace / ltrace to find out which library julia is trying to load that causes this problem. |
OK, my OSX dev-foo is weak. If anyone knows how to find which dynamic libraries are being opened (e.g. strace PROG on linux for opened files), I'd be interested to find out. In any case, I'm a little confused by the following:
Which then leads to this
This seems at odds with the logic of the code above, and I am not sure why this works in one case but not another (it works with MacPorts library path removed). Could there be a problem with some library regexp library that ismatch() is using causing this test to fail? |
Yup, looks like OpenBLAS was a red herring. A PCRE library in MacPorts (pcre 8.3.3) was causing the regex to fail via ismatch() and falsely thinking OpenBLAS was not 64bit capable even when it was. I'm not sure if this is related to any of the PCRE issues. |
Nice job hunting this all down, @cmcbride! I'm submitting a pull request to ensure that you've linked against a relatively recent version of libpcre right now. |
@cmcbride Did you mean "pcre 8.33" instead of "8.3.3"? |
MacPorts pcre is 8.33, so @staticfloat 's patch probably won't help |
@vtjnash do you build against MacPorts pcre, or do you build with Julias? I build with Homebrew's pcre, (8.33 as well) and it works just fine. |
I build against Julia's pcre. The significant difference is probably their unicode support:
macports:
|
Wow, we are on the same wavelength. That's great. I'd like to confirm that it is the unicode stuff, if possible, because we can test for that, and I can add it in to my pull request. |
Looking closer into this, the |
This is a strange bug. If i install the pcre macport, and set
|
In 1a17b64, I've prioritized libraries found in Julia's lib directory over anything in the user's environment. |
yes, I meant 8.33. I agree with @nolta and get the same strangeness with ismatch() and Base.check_blas() It has to be something with PCRE, but something fishy is happening as applying the same logic in the REPL differs from that in Base.check_blas() I just compiled with 1a17b64 that @vtjnash pushed. It did not solve the issue (LD_LIBRARY_PATH was searched first, it appears). |
p.s. Should this now be a new issue? |
I'm a little surprised that recent commit did not solve the issue for you. It worked on my machine. Can you confirm that your DL_LOAD_PATH looks like mine: julia> DL_LOAD_PATH
2-element Union(UTF8String,ASCIIString) Array:
"@executable_path/../lib"
"@executable_path/../lib/julia" |
Sure. Seems to be the same
It's probably related to the PCRE strangeness, but versioninfo() also breaks with this config. Whatever it is probably breaks a lot of things!
|
The fact that this only happens in code in @vtjnash; while writing the This could be a good excuse to write something like this. I was going to myself, but I'm a little busy, and I'm not sure where the best place is to put something like this. (E.g. keeping track of another |
It was only closed a few days ago, and apparently the patch that closed it is broken because exactly the same build-system failure now occurs on a different OSX version. This is an obvious case for a "reopen" rather than "new issue", because the people that were concerned with the original issue should be involved in the new fix. |
Well, at least we have a hint as to what might be causing the problem. Where is your Can you compile this small test file against OpenBLAS and see what
|
I have a Your test program prints |
|
Looks like PCRE is the source of the error, just as above, but that the fix isn't working. |
If you EDIT: OSX doesn't have |
I strongly believe that homebrew should not be installed in The eventual patch should have forced the usage of the libpcre in |
grepping the
I have |
From the above, it sure looks like I am linking Julia's PCRE. Perhaps whatever problem is afflicting the homebrew PCRE is also affecting Julia's own build? |
That seems reasonable to suggest. Do we know what libpcre could be linking against, or perhaps if there is a symbol conflict in the library? |
|
Nope, it's somehow the libpcre in How can we keep Julia from getting confused by this? |
The previous fix was supposed to correct Julia's confusion. Granted, I know little about Julia internals, but I do not understand how your In any case, I just pulled the latest to see if the library priority still works for my config. BTW, did anyone confirm that this is a PCRE 8.33 issue? Seems suspicious that @stevengj and I both had problems with the same version of the library (MacPorts / homebrew), and Julia remains bundled with 8.31. |
I use 8.33 homebrew pcre with no problems.
|
What OSX version, @staticfloat ? |
10.8.3
|
0d39c66 still works for my setup (10.6.8 with the MacPorts PCRE installed on system that Julia avoids). |
immutable Regex
pattern::ByteString
options::Uint32
regex::Array{Uint8} <== The problem is with this cached data
end The problem isn't which version of PCRE we have, the problem is we need to use exactly the same version when compiling the sys.ji file as we use when running julia. I suspect @stevengj results were simply a red herring. (especially since we recently switched from typically using Homebrew and ignoring Macports at sys.ji build time, to using julia's at all times) #3873 could perhaps be of use, to test the value of |
@vtjnash Did you ever figure out what about PCRE causes these problems? I was not able to determine, but I could take another look. |
the problem is that we sometimes link against /usr/local/lib and sometimes don't. if the version of PCRE changes between linking (building sys.ji) and runtime, the compiled regexes are invalid. |
So the problem was never that we were configuring pcre incorrectly? Just that build-time and runtime pcre were not the same? |
right |
Closed by #4959 |
Sorry to respond to an old and closed topic, but this problem exists also on openSUSE 13.1. I have an
Another solution is to recompile the system version of
|
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: e0821116e New commit: 6859d6857 Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@e082111...6859d68 ``` $ git log --oneline e0821116e..6859d6857 6859d6857 precompile: update kwargs (#3838) 4d73d60aa move threads assignment after precompilation (#3840) 28bbbd46f remove line about changing UUID to dev in readme (#3837) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
…7952e (#53762) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: release-1.11 Julia branch: backports-release-1.11 Old commit: 1e6fa605f New commit: bd787952e Julia version: 1.11.0-alpha1 Pkg version: 1.11.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@1e6fa60...bd78795 ``` $ git log --oneline 1e6fa605f..bd787952e bd787952e Merge pull request #3846 from JuliaLang/backports-release-1.11 239702022 precompile: update kwargs (#3838) 4ea3f3576 move threads assignment after precompilation (#3840) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
On recent master branch:
[nibbler julia]% cat .git/refs/heads/master
c575520
Julia builds in 64-bit, but OpenBLAS appears to build in 32-bit:
[nibbler julia]% ./julia
ERROR: OpenBLAS was not built with 64bit integer support.
You're seeing this error because Julia was built with USE_BLAS64=1
Please rebuild Julia with USE_BLAS64=0
Quitting.
@ViralBShah Thinks this might be due to gcc. For reference:
[nibbler julia]% gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The text was updated successfully, but these errors were encountered: