mirror of
https://github.com/vale981/jobmanager
synced 2025-03-04 17:31:39 -05:00
removed debug messages
This commit is contained in:
parent
5fd2e37cd6
commit
da6e1d74b6
1 changed files with 5 additions and 4 deletions
|
@ -108,27 +108,28 @@ def get_user_num_process():
|
||||||
|
|
||||||
def set_mkl_threads(n):
|
def set_mkl_threads(n):
|
||||||
if n == 0:
|
if n == 0:
|
||||||
print("MKL threads not set!")
|
#print("MKL threads not set!")
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
noMKL = noOB = False
|
noMKL = noOB = False
|
||||||
try:
|
try:
|
||||||
mkl_rt = ctypes.CDLL('libmkl_rt.so')
|
mkl_rt = ctypes.CDLL('libmkl_rt.so')
|
||||||
mkl_rt.MKL_Set_Num_Threads(n)
|
mkl_rt.MKL_Set_Num_Threads(n)
|
||||||
print("MKL threads set to", mkl_rt.mkl_get_max_threads())
|
# print("MKL threads set to", mkl_rt.mkl_get_max_threads())
|
||||||
except OSError:
|
except OSError:
|
||||||
noMKL=True
|
noMKL=True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
openblas = ctypes.CDLL('libopenblas.so')
|
openblas = ctypes.CDLL('libopenblas.so')
|
||||||
openblas.openblas_set_num_threads(n)
|
openblas.openblas_set_num_threads(n)
|
||||||
print("openblas threads set to", openblas.openblas_get_num_threads())
|
# print("openblas threads set to", openblas.openblas_get_num_threads())
|
||||||
except OSError:
|
except OSError:
|
||||||
noOB=True
|
noOB=True
|
||||||
|
|
||||||
if noMKL and noOB:
|
if noMKL and noOB:
|
||||||
warnings.warn("num_threads could not be set, MKL / openblas not found")
|
warnings.warn("num_threads could not be set, MKL / openblas not found")
|
||||||
|
|
||||||
print()
|
# print()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue