-
Notifications
You must be signed in to change notification settings - Fork 1
/
010_a_look_at_pyparislog.py
79 lines (62 loc) · 3.05 KB
/
010_a_look_at_pyparislog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import time
import numpy as np
sim_folder = '../test_20b_8kicks_onlyH/004_multibunch_with_ecloud'
sim_folder = '../test_on_HPC_cluster_evenlessspeed_nomultithreading/004_multibunch_with_ecloud' #25ns'
sim_folder = '../test_on_HPC_cluster_evenlessspeed/004_multibunch_with_ecloud' #25ns
#sim_folder = '../test_on_HPC_cluster_lessspeed/004_multibunch_with_ecloud' #12.5ns
#sim_folder = '../test_on_HPC_cluster_speed/004_multibunch_with_ecloud' #12.5ns/2
#sim_folder = '../test_on_HPC_cluster_morespeed/004_multibunch_with_ecloud' #12.5ns/4
sim_folder = '../test2_on_HPC_1slot_1cores/004_multibunch_with_ecloud'
sim_folder = '../test2_on_HPC_1slot_8cores/004_multibunch_with_ecloud'
sim_folder = '../test2_on_HPC_1slot/004_multibunch_with_ecloud'
#sim_folder = '../test2_on_HPC_2slot/004_multibunch_with_ecloud'
#sim_folder = '../test2_on_HPC_4slot/004_multibunch_with_ecloud'
#sim_folder = '../test2_on_HPC_4slot_240cores/004_multibunch_with_ecloud'
#sim_folder = '../test2_on_HPC_8slot/004_multibunch_with_ecloud'
sim_folder = '../test2_on_HPC_4slot_withHT/004_multibunch_with_ecloud'
# sim_folder = '../test2_on_HPC_4slot/004_multibunch_with_ecloud'
sim_folder = '../test3_on_HPC_25ns/004_multibunch_with_ecloud'
sim_folder = '../test4_on_HPC_8slot/004_multibunch_with_ecloud'
sim_folder = '../test6_on_HPC_8slot/004_multibunch_with_ecloud'
sim_folder = '../test9_on_HPC_25ns_correct/004_multibunch_with_ecloud'
#sim_folder = '../test11_on_HPC_25ns_more_slices/004_multibunch_with_ecloud'
#sim_folder = '../test9bis_on_HPC_25ns_correct_be_long/004_multibunch_with_ecloud'
sim_folder = '../test10_onHPC_144b/004_multibunch_with_ecloud'
# For e-cloud meeting
sim_folder = '../test2_on_HPC_8slot/004_multibunch_with_ecloud'
sim_folder = '../test4_on_HPC_8slot/004_multibunch_with_ecloud'
sim_folder = '../test6_on_HPC_8slot/004_multibunch_with_ecloud'
import parse_pyparislog as ppl
dict_config, ibun_arr, t_arr, iturn_arr, iter_turn_steps, \
iturn_steps, tturn_steps, n_turns_steps, avgt_turn_steps = ppl.parse_pyparislog(sim_folder+'/pyparislog.txt')
Dt_iter = np.diff(t_arr)
n_filter = 10
Dt_iter_filtered = np.convolve(Dt_iter, np.ones(n_filter)/float(n_filter), mode='same')
import matplotlib.pyplot as plt
# plt.close('all')
fig1 = plt.figure(figsize=(8,1.3*6))
fig1.set_facecolor('w')
ax1=plt.subplot(4,1,1)
plt.plot(Dt_iter, '.-')
plt.plot(Dt_iter_filtered, 'r-')
ax1.set_ylabel('Iteration\ntime [s]')
ax1.set_ylim(bottom=0)
ax2=plt.subplot(4,1,2, sharex=ax1)
plt.plot(ibun_arr, '.-')
ax2.set_ylabel('"Bunch slot"\nat CPU 0')
ax3=plt.subplot(4,1,3, sharex=ax1)
plt.plot(iturn_arr, '.-')
ax3.plot(iter_turn_steps, iturn_steps, '.r')
ax3.set_ylabel('Turn\nat CPU 0')
ax4=plt.subplot(4,1,4, sharex=ax1)
plt.plot((np.array(t_arr)-t_arr[0])/3600., '.-')
ax4.set_ylabel('Accumulated\ntime [h]')
for ax in [ax1, ax2, ax3, ax4]:
ax.grid('on')
ax.yaxis.set_major_locator(plt.MaxNLocator(4))
for ax in [ax1, ax2, ax3]:
ax.tick_params(labelbottom=False)
fig1.suptitle(sim_folder)
fig1.subplots_adjust(top=0.935, bottom=0.055, left=0.15, right=0.9,
hspace=0.295, wspace=0.2)
plt.show()