Commit 59a6b92f authored by Amaury BARRAL's avatar Amaury BARRAL

Merge remote-tracking branch 'origin/master'

parents 1fe3ac77 411cc3b8
......@@ -46,8 +46,11 @@ def launch_two_groups(output_file: str, L: float, n_birds_1: int, n_birds_2: int
def start_experiment(output_dir: str, L: float, n_birds: int, eta: float = .5, total_time:
float = 100, nb_experiments: int = 1, vel: float = 0.1) -> None:
subdir = ""
if nb_experiments > 1:
subdir = "N_" + str(n_birds) + "_L_" + str(L) + "_Eta_" + str(eta)
for i in range(nb_experiments):
name = "N_" + str(n_birds) + "_L_" + str(L) + "_Eta_" + str(eta) + "_angle_vel_" + "pi" + "_T_" + str(total_time) \
name = subdir + "N_" + str(n_birds) + "_L_" + str(L) + "_Eta_" + str(eta) + "_angle_vel_" + "pi" + "_T_" + str(total_time) \
+ "_vel_" + str(vel) + "_nb_exp_" + str(i+1)
launch_simulation_random("phy571/simulation_data/" + output_dir + "/" + name + ".json", L=L, n_birds=n_birds, eta=eta,
total_time=total_time, ang_vel= 2*np.pi)
......@@ -72,7 +75,8 @@ def ssh_experiments():
'129.104.253.43', '129.104.253.44', '129.104.253.45', '129.104.253.46', '129.104.253.47',
'129.104.253.48', '129.104.253.49', '129.104.253.50', '129.104.253.51', '129.104.253.52',
'129.104.253.53', '129.104.253.54', '129.104.253.55', '129.104.253.56', '129.104.253.64',
'129.104.253.65', '129.104.253.66', '129.104.253.67', '129.104.253.68', '129.104.253.69',
#'129.104.253.65',
'129.104.253.66', '129.104.253.67', '129.104.253.68', '129.104.253.69',
'129.104.253.70', '129.104.253.71', '129.104.253.72', '129.104.253.73', '129.104.253.74',
'129.104.253.75', '129.104.253.76', '129.104.253.77', '129.104.253.78', '129.104.253.79',
'129.104.253.80', '129.104.253.81', '129.104.253.82', '129.104.253.83', '129.104.253.84',
......@@ -86,7 +90,9 @@ def ssh_experiments():
'129.104.254.70', '129.104.254.71', '129.104.254.72', '129.104.254.73', '129.104.254.74',
'129.104.254.75', '129.104.254.76', '129.104.254.77', '129.104.254.78', '129.104.254.79',
'129.104.254.80', '129.104.254.81', '129.104.254.82', '129.104.254.83', '129.104.254.84',
'129.104.254.85', '129.104.254.86', '129.104.254.87', '129.104.254.88', '129.104.252.32',
#'129.104.254.85',
#'129.104.254.86',
'129.104.254.86', '129.104.254.87', '129.104.254.88', '129.104.252.32',
'129.104.252.33', '129.104.252.34', '129.104.252.35', '129.104.252.36', '129.104.252.37',
'129.104.252.38', '129.104.252.39', '129.104.252.40', '129.104.252.41', '129.104.252.42',
'129.104.252.43', '129.104.252.44', '129.104.252.45', '129.104.252.46', '129.104.252.47',
......@@ -97,14 +103,14 @@ def ssh_experiments():
'129.104.252.75', '129.104.252.76', '129.104.252.77', '129.104.252.78', '129.104.252.79',
'129.104.252.80', '129.104.252.81', '129.104.252.82', '129.104.252.83', '129.104.252.84',
'129.104.252.85','129.104.252.86', '129.104.252.87', '129.104.252.88']
login, passw = "", ""
Ns = [400, 1600, 3600, 10000, 40000]
Ls = [20, 40, 60, 100, 200]
t = 4000
Eta = [0.01, 0.05, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8]
file = "27_11_18"
login, passw =
Ns = [400]#, 1600, 3600, 10000, 40000]
Ls = [20]#, 40, 60, 100, 200]
t = 10
Eta = [0.01]#, 0.05, 0.1, 0.11, 0.12, 0.13, 0.132, 0.134, 0.136, 0.138, 0.14, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8]
file = "28_11_18"
vel = 0.1
nb_exp = 10
nb_exp = 2
current_server = -1
for i in range (len(Ns)):
......@@ -121,7 +127,7 @@ def ssh_experiments():
f"./phy571-birds-flocking/venv/bin/python3.6 ./phy571-birds-flocking/Amaury/remote.py --file {file} --n {Ns[i]} --l {Ls[i]} --eta {Eta[k]} "
f"--t {t} --nb_exp {nb_exp} --vel {vel}")
#ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(f"pkill ./phy571-birds-flocking/venv/bin/python3.6 && pkill ./phy571-birds-flocking/venv/bin/python")
#ssh_stdout, ssh_stderr = ssh_stdout.read(), ssh_stderr.read()
ssh_stdout, ssh_stderr = ssh_stdout.read(), ssh_stderr.read()
ssh.close()
log.info(f"server: {current_server_ip}, stdin: {ssh_stdin}, stdout: {ssh_stdout}, stderr: {ssh_stderr}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment