-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Problem benchmarking OpenBLAS GEMM #973
Comments
this stack overflow question suggests it is related to a mutex being destroyed before a lock is attempted. Can you post your build commands and logs? #67 was similar and was caused by pthread not being linked. I don't see anything in the newer commits that might affect this issue. |
First thing, thanks a lot for this fast response.
Yeah I got into that one, that is why I'm trying to have a "no thread" execution. I have even tried not to link pthreads but it doesn't work. This is my build log:
And this is how I'm compiling the benchmark:
Running with gdb I can see a single thread running but I think it does not guarantee that OpenBLAS won't mess up with the mutex. Running the benchmark code outside google benchmark it works fine. Also removing the OpenBLAS line the benchmark code also runs fine. The only broken scenario is using them together. Just for saying, I don't need an elegant solution. This is just for some personal tests but I really like to use google benchmark instead of doing everything "manually". This library is too good to give it up easily. 😄 Thanks (again) for your help. |
I have a local version running that isn't crashing, which is really annoying. |
I also set the number of openblas threads to 4 in both to see what happened.
|
Well, that is good news, now we know that they can work together just out of the box. You're using clang instead of gcc but I don't think gcc is to blame, at least not in the moment. What gets my attention is: you are using the default version of OpenBLAS. My guess is that your OpenBLAS version have some kind of lock mechanism that mine does not. |
"How can I use OpenBLAS in multi-threaded applications? strongly suggests that having the two working together isn't going to work if the version isn't compiled this way. |
It turns out that the problem was exactly that. I got it working by compiling OpenBLAS with:
I'll leave it here for future reference, maybe it will help someone else. Thanks a lot for your time @dominichamon , I really mean it :) See you 😄 |
i'm so glad you got it. i'll close this but obviously it'll be available if folks search. |
I'm sorry if it's not a bug by I think this is the place to ask for help.
I'm trying to use this library to measure a GEMM with OpenBLAS.
So, basically I have:
Problem is, for any
state.range(0)
bigger than 15 I get this crash:I suspect that this is something thread related. But I've compiled OpenBLAS with all single thread flags possible. Running this code with gdb and a breakpoint, code runs just perfect.
I'm using a relative old version, 168604d.
Here's the backtrace using gdb:
The text was updated successfully, but these errors were encountered: