now the number of threads per run is restricted to what the user asks
This commit is contained in:
parent
0ecddcf8f8
commit
ddcb9f1175
|
@ -104,7 +104,12 @@ class StarBencher():
|
|||
stdout = open(stdout_filepath, 'w')
|
||||
if stderr_filepath is not None:
|
||||
stderr = open(stderr_filepath, 'w')
|
||||
proc = subprocess.Popen(popen_args, cwd=cwd, stdout=stdout, stderr=stderr)
|
||||
env = os.environ.copy()
|
||||
# restrict the number of threads used by openmp
|
||||
env['OMP_NUM_THREADS'] = '%d' % self.num_cores_per_run
|
||||
# restrict the nu,ber of threads used by intel math kernel library
|
||||
env['MKL_NUM_THREADS'] = '%d' % self.num_cores_per_run
|
||||
proc = subprocess.Popen(popen_args, cwd=cwd, stdout=stdout, stderr=stderr, env=env)
|
||||
proc.wait()
|
||||
if stderr is not None:
|
||||
stderr.close()
|
||||
|
|
Loading…
Reference in New Issue