Skip to content
Snippets Groups Projects
Commit 27172647 authored by Matthieu Oberon's avatar Matthieu Oberon
Browse files

analyse results of comm times

parent a0e1e886
Branches
No related tags found
No related merge requests found
import matplotlib.pyplot as plt
color = ["orange", "blue"]
j = 0
for method in ["SendRcv", "GatherBcast"]:
for nb_process in [1, 16]:
times=10*[0]
count=10*[0]
with open(f"comm_times/{method}_{nb_process}np", 'r') as file:
for line in file:
if line[0] == "A":
i = int(line.split(" ")[2])
time = float(line.split(" ")[-2])
times[i] += time
count[i] += 1
iterations = [i+1 for i in range(len(times))]
times = [times[i]/count[i] for i in range(len(times))]
if nb_process == 1:
plt.plot(iterations, times, '+--', color=color[j], label=f"{method} sur {nb_process} process")
else:
plt.plot(iterations, times, '+-', color=color[j], label=f"{method} sur {nb_process} processes")
j += 1
plt.xlabel("Géneration de fourmis")
plt.ylabel("Temps (s)")
plt.legend()
plt.title("Temps de mise à jour de tau et de communication entre les processus pour différentes stratégies de parallélisation")
plt.show()
\ No newline at end of file
...@@ -32,22 +32,22 @@ At iteration 1 on process 7 the update of tau takes 0.058904409408569336 s. ...@@ -32,22 +32,22 @@ At iteration 1 on process 7 the update of tau takes 0.058904409408569336 s.
At iteration 1 on process 8 the update of tau takes 0.058836936950683594 s. At iteration 1 on process 8 the update of tau takes 0.058836936950683594 s.
At iteration 1 on process 3 the update of tau takes 0.05885577201843262 s. At iteration 1 on process 3 the update of tau takes 0.05885577201843262 s.
-------------------------- --------------------------
At iteration 1 on process 11 the update of tau takes 0.05885124206542969 s. At iteration 2 on process 8 the update of tau takes 0.05591082572937012 s.
At iteration 1 on process 9 the update of tau takes 0.05883288383483887 s. At iteration 2 on process 12 the update of tau takes 0.05593228340148926 s.
At iteration 1 on process 6 the update of tau takes 0.058897972106933594 s. At iteration 2 on process 11 the update of tau takes 0.05600094795227051 s.
At iteration 1 on process 12 the update of tau takes 0.05881857872009277 s. At iteration 2 on process 6 the update of tau takes 0.055899620056152344 s.
At iteration 1 on process 10 the update of tau takes 0.05885767936706543 s. At iteration 2 on process 13 the update of tau takes 0.05593109130859375 s.
At iteration 1 on process 0 the update of tau takes 0.05882835388183594 s. At iteration 2 on process 9 the update of tau takes 0.055908203125 s.
At iteration 1 on process 5 the update of tau takes 0.058851003646850586 s. At iteration 2 on process 10 the update of tau takes 0.05600118637084961 s.
At iteration 1 on process 1 the update of tau takes 0.0588221549987793 s. At iteration 2 on process 2 the update of tau takes 0.056098222732543945 s.
At iteration 1 on process 14 the update of tau takes 0.05881857872009277 s. At iteration 2 on process 4 the update of tau takes 0.05602216720581055 s.
At iteration 1 on process 4 the update of tau takes 0.0588531494140625 s. At iteration 2 on process 14 the update of tau takes 0.055823326110839844 s.
At iteration 1 on process 15 the update of tau takes 0.05881547927856445 s. At iteration 2 on process 15 the update of tau takes 0.055820465087890625 s.
At iteration 1 on process 13 the update of tau takes 0.05881524085998535 s. At iteration 2 on process 3 the update of tau takes 0.056104421615600586 s.
At iteration 1 on process 2 the update of tau takes 0.05886030197143555 s. At iteration 2 on process 7 the update of tau takes 0.05589485168457031 s.
At iteration 1 on process 7 the update of tau takes 0.058904409408569336 s. At iteration 2 on process 0 the update of tau takes 0.05580782890319824 s.
At iteration 1 on process 8 the update of tau takes 0.058836936950683594 s. At iteration 2 on process 1 the update of tau takes 0.055797576904296875 s.
At iteration 1 on process 3 the update of tau takes 0.05885577201843262 s. At iteration 2 on process 5 the update of tau takes 0.05602073669433594 s.
-------------------------- --------------------------
At iteration 3 on process 13 the update of tau takes 0.07634973526000977 s. At iteration 3 on process 13 the update of tau takes 0.07634973526000977 s.
At iteration 3 on process 2 the update of tau takes 0.07608437538146973 s. At iteration 3 on process 2 the update of tau takes 0.07608437538146973 s.
......
File moved
results/images/comm_times.png

61.8 KiB

...@@ -66,4 +66,3 @@ axs[0, 0].set_xlabel("Chemins triés par throughput décroissant") ...@@ -66,4 +66,3 @@ axs[0, 0].set_xlabel("Chemins triés par throughput décroissant")
fig.suptitle("Chemins suivis à la dernière itération pour différents batchs.") fig.suptitle("Chemins suivis à la dernière itération pour différents batchs.")
fig.tight_layout(pad=0.5) fig.tight_layout(pad=0.5)
plt.show() plt.show()
plt.close(10)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment