-
Notifications
You must be signed in to change notification settings - Fork 1.6k
USE_OPENMP=0 makes the whole system runs on only one cpu core. #1591
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
When you type "make" it uses pthreads on linux.
|
Actually already spotted before - USE_XYZ=0 has different effect than not defining it at all. |
The behaviour of USE_OPENMP=0 (rather than leaving that variable unset) may indeed need checking (Makefile.system does force it to "0" when NUM_THREADS is set to 1, but several parts of the code only check if USE_OPENMP is defined at all). |
@martin-frbg I checked the version I've built, it's v0.2.20, and |
Problem solved, or should this issue be kept open ? |
I have a project where many parts of it use openmp or std::thread for parallelization, and it works fine on a 12-core linux server.
Now I use openblas in one of the modules in the project, the default
make
build me a single threaded version(by runmake
withoutUSE_OPENMP=1
), when it is linked to the project, the whole system runs like in single thread even if the module that calls openblas functions is not actually called in the runtime.It seems the system can only see one cpu core, and the number of thread that created while running is far more than 1. so the speed drops dramatically.
I fix this by rebuild openblas library with
make USE_OPENMP=1
, but I think this flag should only affects the behavior of openblas, not the system that calls it.My question is:
The text was updated successfully, but these errors were encountered: