Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
PHY571 Birds flocking
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin LOUIS
PHY571 Birds flocking
Commits
0f228340
Commit
0f228340
authored
Nov 27, 2018
by
Quentin Louis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
big computation works
parent
29853b3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
14 deletions
+51
-14
Amaury/experiments.py
Amaury/experiments.py
+51
-14
No files found.
Amaury/experiments.py
View file @
0f228340
...
...
@@ -48,7 +48,7 @@ def start_experiment(output_dir: str, L: float, n_birds: int, eta: float = .5, t
float
=
100
,
nb_experiments
:
int
=
1
,
vel
:
float
=
0.1
)
->
None
:
for
i
in
range
(
nb_experiments
):
name
=
"N_"
+
str
(
n_birds
)
+
"_L_"
+
str
(
L
)
+
"_Eta_"
+
str
(
eta
)
+
"_angle_vel_"
+
"pi"
+
"_T_"
+
str
(
total_time
)
\
+
"_vel_"
+
str
(
vel
)
+
"_nb_exp_"
+
str
(
nb_experiments
)
+
"_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
)
...
...
@@ -63,29 +63,66 @@ float = 100, nb_experiments: int = 1, vel: float = 0.1) -> None:
def
ssh_experiments
():
addresses
=
[
"ablette, anchois, anguille, barbeau, barbue, baudroie, brochet, carrelet, gardon, gymnote, labre, "
"lieu, lotte, mulet, murene, piranha, raie, requin, "
"rouget, roussette, saumon, silure, sole, thon, truite"
]
login
,
passw
=
"quentin.louis"
,
"Ri6elM1/1"
Ns
=
[
10
,
100
]
ls
=
[
10
,
15
]
t
=
10
eta
=
.
5
file
=
"test"
addresses
=
[
'129.104.254.97'
,
'129.104.254.98'
,
'129.104.254.99'
,
'129.104.254.100'
,
'129.104.254.101'
,
'129.104.254.102'
,
'129.104.254.103'
,
'129.104.254.104'
,
'129.104.254.105'
,
'129.104.254.106'
,
'129.104.254.107'
,
'129.104.254.108'
,
'129.104.254.109'
,
'129.104.254.110'
,
'129.104.254.111'
,
'129.104.254.112'
,
'129.104.254.113'
,
'129.104.254.114'
,
'129.104.254.115'
,
'129.104.253.32'
,
'129.104.253.33'
,
'129.104.253.34'
,
'129.104.253.35'
,
'129.104.253.36'
,
'129.104.253.37'
,
'129.104.253.38'
,
'129.104.253.39'
,
'129.104.253.40'
,
'129.104.253.41'
,
'129.104.253.42'
,
'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.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'
,
'129.104.253.85'
,
'129.104.253.86'
,
'129.104.253.87'
,
'129.104.253.88'
,
'129.104.254.32'
,
'129.104.254.33'
,
'129.104.254.34'
,
'129.104.254.35'
,
'129.104.254.36'
,
'129.104.254.37'
,
'129.104.254.38'
,
'129.104.254.39'
,
'129.104.254.40'
,
'129.104.254.41'
,
'129.104.254.42'
,
'129.104.254.43'
,
'129.104.254.44'
,
'129.104.254.45'
,
'129.104.254.46'
,
'129.104.254.47'
,
'129.104.254.48'
,
'129.104.254.49'
,
'129.104.254.50'
,
'129.104.254.51'
,
'129.104.254.52'
,
'129.104.254.53'
,
'129.104.254.54'
,
'129.104.254.55'
,
'129.104.254.56'
,
'129.104.254.64'
,
'129.104.254.65'
,
'129.104.254.66'
,
'129.104.254.67'
,
'129.104.254.68'
,
'129.104.254.69'
,
'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.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'
,
'129.104.252.48'
,
'129.104.252.49'
,
'129.104.252.50'
,
'129.104.252.51'
,
'129.104.252.52'
,
'129.104.252.53'
,
'129.104.252.54'
,
'129.104.252.55'
,
'129.104.252.56'
,
'129.104.252.64'
,
'129.104.252.65'
,
'129.104.252.66'
,
'129.104.252.67'
,
'129.104.252.68'
,
'129.104.252.69'
,
'129.104.252.70'
,
'129.104.252.71'
,
'129.104.252.72'
,
'129.104.252.73'
,
'129.104.252.74'
,
'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"
vel
=
0.1
nb_exp
=
1
nb_exp
=
1
0
current_server
=
-
1
for
n
in
Ns
:
for
l
in
ls
:
for
i
in
range
(
len
(
Ns
))
:
for
k
in
range
(
len
(
Eta
))
:
current_server
+=
1
print
(
current_server
)
#if current_server > 109:
current_server_ip
=
addresses
[
current_server
%
len
(
addresses
)]
ssh
=
paramiko
.
SSHClient
()
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
connect
(
current_server_ip
,
username
=
login
,
password
=
passw
)
ssh_stdin
,
ssh_stdout
,
ssh_stderr
=
ssh
.
exec_command
(
f"./phy571-birds-flocking/venv/bin/python3.6
remote.py --file
{
file
}
--n
{
n
}
--l
{
l
}
--eta
{
eta
}
"
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
.
close
()
log
.
info
(
f"server:
{
current_server_ip
}
, stdin:
{
ssh_stdin
}
, stdout:
{
ssh_stdout
}
, stderr:
{
ssh_stderr
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment