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
Unverified
Commit
ef2f229b
authored
Sep 27, 2024
by
Jakob Görgen
Browse files
added simualtor cleanup_commands
parent
ce2027ee
Changes
3
Hide 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
...
...
@@ -248,6 +248,9 @@ class Simulator(utils_base.IdObj):
def
checkpoint_commands
(
self
)
->
list
[
str
]:
return
[]
def
cleanup_commands
(
self
)
->
list
[
str
]:
return
[]
@
abc
.
abstractmethod
def
supported_socket_types
(
self
)
->
set
[
inst_base
.
SockType
]:
...
...
experiments/simbricks/orchestration/simulation/host.py
View file @
ef2f229b
...
...
@@ -90,6 +90,9 @@ class Gem5Sim(HostSim):
def
checkpoint_commands
(
self
)
->
list
[
str
]:
return
[
"m5 checkpoint"
]
def
cleanup_commands
(
self
)
->
list
[
str
]:
return
[
"m5 exit"
]
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
cpu_type
=
self
.
cpu_type
...
...
experiments/simbricks/orchestration/system/host/base.py
View file @
ef2f229b
...
...
@@ -105,9 +105,13 @@ class BaseLinuxHost(FullSystemHost):
def
cleanup_cmds
(
self
,
inst
:
instantiation
.
Instantiation
)
->
list
[
str
]:
"""Commands to run to cleanup node."""
return
self
.
_concat_app_cmds
(
cmds
=
self
.
_concat_app_cmds
(
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
]:
"""
...
...
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