Improved setting of threads in benchmarking mode.

这个提交包含在:
Craig Warren
2016-12-05 15:20:14 +00:00
父节点 6216ab401c
当前提交 548bf9e434

查看文件

@@ -202,11 +202,14 @@ def run_benchmark_sim(args, inputfile, usernamespace):
""" """
# Number of threads to test - start from max physical CPU cores and divide in half until 1 # Number of threads to test - start from max physical CPU cores and divide in half until 1
thread = psutil.cpu_count(logical=False) minthreads = 1
threads = [thread] maxthreads = psutil.cpu_count(logical=False)
while not thread % 2: threads = []
thread /= 2 while thread < maxthreads:
threads.append(int(thread)) threads.append(int(thread))
thread *= 2
threads.append(int(maxthreads))
threads.reverse()
benchtimes = np.zeros(len(threads)) benchtimes = np.zeros(len(threads))
numbermodelruns = len(threads) numbermodelruns = len(threads)