-
Notifications
You must be signed in to change notification settings - Fork 1.6k
single thread cause core dump #1141
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
Comments
|
@martin-frbg thank you very much.
|
@qiankunhuanying From your first post, looks like you have used the following steps to compile. If the above are the steps that you followed, then they are not consistent with each other. |
Such crash is usually sign of calling convention mismatch, i.e ld.so calls library initialiser function before main() |
@ashwinyes
|
@martin-frbg @ashwinyes |
i also have a coredump when single thread. |
@poryfly I also got your error info once, unfortunately, I saw the file USAGE.md, and get the information below:
In OpenBLAS, we mange a pool of memory buffers and allocate the number of
This error indicates that the program exceeded the number of buffers. Please build OpenBLAS with larger And I set NUM_THREADS=64, but nothing changed... I have been very confused. |
@qiankunhuanying @poryfly Could you let us know how many threads your program has running concurrently? And which OpenBLAS APIs are your threads calling? |
@ashwinyes i just want to test single thread.so my docker(ubuntu) just have one cpu.my pragram has 5 threads.I call cblas_sgemm |
|
@poryfly I was able to reproduce your problem. And setting NUM_THREADS to a higher value solved the issue. Here is how NUM_BUFFERS is defined. NUM_CORES is the number of cores on the machine where you are building OpenBLAS. So if you are building from a docker with one cpu, NUM_CORES=1 and hence NUM_BUFFERS=2. This will not be enough for 5 threads. So if I hardcode NUM_THREADS=3, then NUM_BUFFERS=6 and it solves the problem. |
@ashwinyes i have a question.now when i use single thread--USE_THREAD=0,why i should set NUM_THREADS.i think single thread donot need set NUM_THREADS |
You are setting NUM_THREADS because eventually it is used to calculate NUM_BUFFERS, regardless of OpenBLAS being single threaded or multithreaded. When you call an API like SGEMM, it needs its own buffers to work on. So if you have a multithreaded program and you call SGEMM from multiple threads at the same, each invocation of SGEMM will require its own buffer. Hope you understood. Agree that usage of word THREADS is a little misleading. |
Did that fix your issue, @poryfly? Am asking as I'm running into a similar problem and want to know if this might help before really digging into it. |
The text was updated successfully, but these errors were encountered: