Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
0fe2c879
Commit
0fe2c879
authored
Jul 02, 2021
by
Antoine Kaufmann
Browse files
experiments: introduce send_file in executor
(preparation for remote commands)
parent
8c910d9c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
experiments/simbricks/exectools.py
experiments/simbricks/exectools.py
+7
-1
experiments/simbricks/experiments.py
experiments/simbricks/experiments.py
+1
-0
No files found.
experiments/simbricks/exectools.py
View file @
0fe2c879
...
@@ -202,6 +202,8 @@ class Executor(object):
...
@@ -202,6 +202,8 @@ class Executor(object):
async
def
await_file
(
self
,
path
,
delay
=
0.05
,
verbose
=
False
):
async
def
await_file
(
self
,
path
,
delay
=
0.05
,
verbose
=
False
):
raise
NotImplementedError
(
"Please Implement this method"
)
raise
NotImplementedError
(
"Please Implement this method"
)
async
def
send_file
(
self
,
path
,
verbose
=
False
):
raise
NotImplementedError
(
"Please Implement this method"
)
# runs the list of commands as strings sequentially
# runs the list of commands as strings sequentially
async
def
run_cmdlist
(
self
,
label
,
cmds
,
verbose
=
True
,
host
=
None
):
async
def
run_cmdlist
(
self
,
label
,
cmds
,
verbose
=
True
,
host
=
None
):
...
@@ -221,3 +223,7 @@ class LocalExecutor(Executor):
...
@@ -221,3 +223,7 @@ class LocalExecutor(Executor):
print
(
'await_file(%s)'
%
path
)
print
(
'await_file(%s)'
%
path
)
while
not
os
.
path
.
exists
(
path
):
while
not
os
.
path
.
exists
(
path
):
await
asyncio
.
sleep
(
delay
)
await
asyncio
.
sleep
(
delay
)
async
def
send_file
(
self
,
path
,
verbose
):
# locally we do not need to do anything
pass
\ No newline at end of file
experiments/simbricks/experiments.py
View file @
0fe2c879
...
@@ -66,6 +66,7 @@ class Experiment(object):
...
@@ -66,6 +66,7 @@ class Experiment(object):
if
verbose
:
if
verbose
:
print
(
'preparing config tar:'
,
path
)
print
(
'preparing config tar:'
,
path
)
host
.
node_config
.
make_tar
(
path
)
host
.
node_config
.
make_tar
(
path
)
await
exec
.
send_file
(
path
,
verbose
)
# prepare all simulators in parallel
# prepare all simulators in parallel
sims
=
[]
sims
=
[]
...
...
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