Skip to content
Snippets Groups Projects
Commit 27c4817a authored by Emile Prost's avatar Emile Prost
Browse files

code for testing the impact of the number of threads

parent 50f93c3a
Branches
No related tags found
No related merge requests found
import subprocess
import sys
import os
import launcher_SUBP
import tools
throughputs = []
mean_throughtputs = []
launcher_SUBP.compileSUBP(optimization="-O3", simd="avx512")
for nb_threads in range(4,9):
for iter in range(6):
res = subprocess.run("mpirun -np 1 -map-by ppr:1:socket -bind-to socket bin/* 512 256 512 " + str(nb_threads) + " 100 128 20 9", shell=True,
stdout=subprocess.PIPE)
for line in str(res.stdout,'utf-8').split('\n'):
if "throughput" in line:
# Find float in line
throughput = float(re.findall("\d+\.\d+", line)[0])
troughputs[nb_threads] += troughput
troughputs[nb_threads] = troughputs[nb_threads]/6
print('Mean value of throughput in the configuration [512, 256, 512, 128, 20, 9]')
print('for a number of threads going from 4 to 8 :')
print(throughputs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment