Commit 9f6b5fd9 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

add a parameter for nthreads

parent 07bdff41
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -73,10 +73,13 @@ from mantid.kernel import V3D
from mantid import config
config['Q.convention'] = "Crystallography"
DownloadInstrument(ForceUpdate=True)
config['MultiThreaded.MaxCores'] == 1
os.environ['OPENBLAS_NUM_THREADS'] = '1'
os.environ['OMP_NUM_THREADS'] = '1'
os.environ['_SC_NPROCESSORS_ONLN'] = '1'

nthreads = os.environ.get('TOPAZ_NUM_THREADS', '1')

config['MultiThreaded.MaxCores'] == int(nthreads)
os.environ['OPENBLAS_NUM_THREADS'] = nthreads
os.environ['OMP_NUM_THREADS'] = nthreads
os.environ['_SC_NPROCESSORS_ONLN'] = nthreads
        
import numpy as np
import itertools