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
ef2f229b
"vscode:/vscode.git/clone" did not exist on "b7aeecaf3e6da14e173cfe83872f77e6fa74caa1"
Unverified
Commit
ef2f229b
authored
Sep 27, 2024
by
Jakob Görgen
Browse files
added simualtor cleanup_commands
parent
ce2027ee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
experiments/simbricks/orchestration/simulation/base.py
experiments/simbricks/orchestration/simulation/base.py
+3
-0
experiments/simbricks/orchestration/simulation/host.py
experiments/simbricks/orchestration/simulation/host.py
+3
-0
experiments/simbricks/orchestration/system/host/base.py
experiments/simbricks/orchestration/system/host/base.py
+6
-2
No files found.
experiments/simbricks/orchestration/simulation/base.py
View file @
ef2f229b
...
@@ -249,6 +249,9 @@ class Simulator(utils_base.IdObj):
...
@@ -249,6 +249,9 @@ class Simulator(utils_base.IdObj):
def
checkpoint_commands
(
self
)
->
list
[
str
]:
def
checkpoint_commands
(
self
)
->
list
[
str
]:
return
[]
return
[]
def
cleanup_commands
(
self
)
->
list
[
str
]:
return
[]
@
abc
.
abstractmethod
@
abc
.
abstractmethod
def
supported_socket_types
(
self
)
->
set
[
inst_base
.
SockType
]:
def
supported_socket_types
(
self
)
->
set
[
inst_base
.
SockType
]:
return
[]
return
[]
...
...
experiments/simbricks/orchestration/simulation/host.py
View file @
ef2f229b
...
@@ -91,6 +91,9 @@ class Gem5Sim(HostSim):
...
@@ -91,6 +91,9 @@ class Gem5Sim(HostSim):
def
checkpoint_commands
(
self
)
->
list
[
str
]:
def
checkpoint_commands
(
self
)
->
list
[
str
]:
return
[
"m5 checkpoint"
]
return
[
"m5 checkpoint"
]
def
cleanup_commands
(
self
)
->
list
[
str
]:
return
[
"m5 exit"
]
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
cpu_type
=
self
.
cpu_type
cpu_type
=
self
.
cpu_type
if
inst
.
create_cp
():
if
inst
.
create_cp
():
...
...
experiments/simbricks/orchestration/system/host/base.py
View file @
ef2f229b
...
@@ -105,9 +105,13 @@ class BaseLinuxHost(FullSystemHost):
...
@@ -105,9 +105,13 @@ class BaseLinuxHost(FullSystemHost):
def
cleanup_cmds
(
self
,
inst
:
instantiation
.
Instantiation
)
->
list
[
str
]:
def
cleanup_cmds
(
self
,
inst
:
instantiation
.
Instantiation
)
->
list
[
str
]:
"""Commands to run to cleanup node."""
"""Commands to run to cleanup node."""
return
self
.
_concat_app_cmds
(
cmds
=
self
.
_concat_app_cmds
(
inst
,
app
.
BaseLinuxApplication
.
cleanup_cmds
.
__name__
inst
,
app
.
BaseLinuxApplication
.
cleanup_cmds
.
__name__
)
)
sim
=
inst
.
find_sim_by_spec
(
spec
=
self
)
cleanup
=
sim
.
cleanup_commands
()
cmds
+=
cleanup
return
cmds
def
config_files
(
self
,
inst
:
instantiation
.
Instantiation
)
->
dict
[
str
,
tp
.
IO
]:
def
config_files
(
self
,
inst
:
instantiation
.
Instantiation
)
->
dict
[
str
,
tp
.
IO
]:
"""
"""
...
...
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