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
78685ea5
Commit
78685ea5
authored
Aug 11, 2023
by
Jonas Kaufmann
Committed by
Antoine Kaufmann
Sep 04, 2023
Browse files
simulators.py: improve doc strings for Simulator class
parent
69f24141
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
experiments/simbricks/orchestration/simulators.py
experiments/simbricks/orchestration/simulators.py
+13
-5
No files found.
experiments/simbricks/orchestration/simulators.py
View file @
78685ea5
...
@@ -38,11 +38,19 @@ class Simulator(object):
...
@@ -38,11 +38,19 @@ class Simulator(object):
self
.
name
=
''
self
.
name
=
''
def
resreq_cores
(
self
):
def
resreq_cores
(
self
):
"""Number of cores required for this simulator."""
"""
Number of cores this simulator requires during execution.
This is used for scheduling multiple runs and experiments.
"""
return
1
return
1
def
resreq_mem
(
self
):
def
resreq_mem
(
self
):
"""Memory required for this simulator (in MB)."""
"""
Number of memory in MB this simulator requires during execution.
This is used for scheduling multiple runs and experiments.
"""
return
64
return
64
def
full_name
(
self
):
def
full_name
(
self
):
...
@@ -51,16 +59,16 @@ class Simulator(object):
...
@@ -51,16 +59,16 @@ class Simulator(object):
# pylint: disable=unused-argument
# pylint: disable=unused-argument
def
prep_cmds
(
self
,
env
:
ExpEnv
)
->
tp
.
List
[
str
]:
def
prep_cmds
(
self
,
env
:
ExpEnv
)
->
tp
.
List
[
str
]:
"""Commands to
run to
prepare simulator."""
"""Commands to prepare
execution of this
simulator."""
return
[]
return
[]
# pylint: disable=unused-argument
# pylint: disable=unused-argument
def
run_cmd
(
self
,
env
:
ExpEnv
)
->
tp
.
Optional
[
str
]:
def
run_cmd
(
self
,
env
:
ExpEnv
)
->
tp
.
Optional
[
str
]:
"""Command to
run to
execute simulator."""
"""Command to execute
this
simulator."""
return
None
return
None
def
dependencies
(
self
)
->
tp
.
List
[
Simulator
]:
def
dependencies
(
self
)
->
tp
.
List
[
Simulator
]:
"""Other simulators t
his one depend
s on."""
"""Other simulators t
o execute before thi
s on
e
."""
return
[]
return
[]
# Sockets to be cleaned up
# Sockets to be cleaned up
...
...
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