-
Notifications
You must be signed in to change notification settings - Fork 1.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
crash on OS X 10.8.3 when using DYNAMIC_ARCH=1 USE_THREAD=1 #221
Comments
Hi @ViralBShah , Is it failed at building stage or running stage? Xianyi |
I get a segfault when trying to multiply two matrices - at runtime. |
Hi @ViralBShah , I just tried gcc & gfortran 4.7 with DYNAMIC_ARCH=1 NO_AFFINITY=1 INTERFACE64=1 BINARY=64 USE_THREAD=1 on OS X 10.8.3. The dgemm works fine. Could you try it from http://xianyi.github.io/OpenBLAS/download/0.2.6/openblas_0.2.6_osx.tar.gz ? I will try clang. Xianyi |
Hi @xianyi Is this the same as the released 0.2.6 openblas, or something you have patched? |
May be similar issue as #225 |
Also, I do not observe the error running multi-threaded dgemm if I am using Sorry for these reports that are not very specific. |
I deleted everything and started from scratch, and this no longer crashes. |
Oops - this still crashes. Turns out I had added OPENBLAS_NUM_THREADS=1 in my .bashrc. |
Hi @ViralBShah , Please try the tarball. It is built on latest develop branch. Xianyi |
Will do @xianyi. I also see the crash on 32-bit, now that I unset my environment variable for num threads. |
I built the |
I am unable to try your provided openblas due to lack of LAPACK. Could you build it with LAPACK as well? There is a problem with libgfortran as well, since I am on 4.8.1, but I figure that I can just use the 4.8.1 files here. |
If you build with |
This is the openblas build output (on develop branch). Perhaps on mac, the max number of threads can be kept at something like 16.
|
Hi @ViralBShah , Could you try static link OpenBLAS library, e.g. libopenblas.a ? Xianyi |
Good idea. I compiled it into a dynamic library with This works fine and there are no crashes. |
Interesting. Could you double check the result? Is it multi-threaded and DYNAMIC_ARCH=1? |
I am using your provided library, which is built with DYNAMIC_ARCH and multi-threading. More so, I checked that I am using multiple cores. Julia has a The only difference between your build and mine seems to be that you are using gfortran 4.7 and I am using 4.8. |
Could you try to convert your compiled static library as following, too?
I want to make sure whether this is a bug about generating dylib. Xianyi |
Trying that on the develop branch, it fails as before. It seems that the dylib generation is fine. |
This is the stacktrace
Is openmp more stable / higher performance than the pthreads version? |
@ViralBShah , Could you try to enable DEBUG=1? |
This is what I get inside julia:
|
These are the compilers I am using:
|
I built again this time by removing the |
I finally narrowed it down. Compiling with 128 threads max instead of 256 fixed this for me on mac. Perhaps there is some kind of memory corruption when using a large number of threads - which for some reason only shows up when using DYNMAIC_ARCH. |
Thank you for the investigation. I will debug this error. 2013/7/1 Viral B. Shah notifications@github.com
|
…S X with DYNAMIC_ARCH=1 & NUM_THREADS=256.
Hi @ViralBShah , I think I fixed this bug on develop branch. Could you try it? Xianyi |
When NUM_THREADS(MAX_CPU_NUNBERS) is very large ,e.g. 256. typedef struct { volatile BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE]; } job_t; job_t job[MAX_CPU_NUMBER]; The job array is equal 8MB. Thus, We use malloc instead of stack allocation.
@ViralBShah , I fixed this bug in last commit, which didn't change the stack limit on Mac OS X. |
OpenBLAS is crashing when built for the julia distribution on the mac, when used in multi-threaded mode. The relevant flags are:
DYNAMIC_ARCH=1 NO_AFFINITY=1 INTERFACE64=1 BINARY=64 USE_THREAD=1
I am using OS X 10.8.3, clang 4.2, and gfortran 4.8.0 from brew. Single threaded works fine, but multi-threaded crashes. I believe this crash is related to
DYNAMIC_ARCH=1
, since that flag is only used when building openblas for the julia binary distribution on OS X, and is otherwise not used.The text was updated successfully, but these errors were encountered: