luhenry / netlib

An high-performance, hardware-accelerated implementation of Netlib in Java
Other
64 stars 12 forks source link

Does the JNI library respect OMP_NUM_THREADS or OPENBLAS_NUM_THREADS environment to controlling the number of thread used ? #14

Closed WeichenXu123 closed 2 years ago

WeichenXu123 commented 2 years ago

Does the JNI library respect OMP_NUM_THREADS or OPENBLAS_NUM_THREADS environment to controlling the number of thread used ?

In my test, I found no matter which value I set for these 2 variables, the performance always decreases when parallelism increased. I guess the library does not handle the environment correctly.

WeichenXu123 commented 2 years ago

CC @luhenry Thank you!

luhenry commented 2 years ago

@WeichenXu123 the JNI library doesn't use these values directly. These values are going to be available to the libblas.so.3 library that's being used, so if this library is OpenBLAS then it's going to make use of it.