Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
868c3d53
Commit
868c3d53
authored
May 29, 2019
by
Lukas Weber
Committed by
Lukas Sommer
Jun 07, 2019
Browse files
Added the deleteProjects flag to the DSE
parent
0bfbe567
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/scala/tapasco/dse/Exploration.scala
View file @
868c3d53
...
...
@@ -50,7 +50,8 @@ private class ConcreteExploration(
val
designFrequency
:
Heuristics.Frequency
,
val
batchSize
:
Int
=
Exploration
.
MAX_BATCH_SZ
,
val
basePath
:
Path
,
val
debugMode
:
Option
[
String
])(
implicit
cfg
:
Configuration
,
val
tasks
:
Tasks
)
extends
Exploration
{
val
debugMode
:
Option
[
String
],
val
deleteOnFail
:
Boolean
=
false
)(
implicit
cfg
:
Configuration
,
val
tasks
:
Tasks
)
extends
Exploration
{
private
implicit
val
_exploration
=
this
private
[
this
]
val
_logger
=
de
.
tu_darmstadt
.
cs
.
esa
.
tapasco
.
Logging
.
logger
(
getClass
)
private
var
_result
:
Option
[(
DesignSpace.Element
,
Composer.Result
)]
=
None
...
...
@@ -106,7 +107,7 @@ private class ConcreteExploration(
val
feasibleElem
=
DesignSpace
.
Element
(
run
.
element
.
composition
,
newFrequency
,
newH
)
// skip feedback elements with frequency of less than 50 MHz
if
(
newFrequency
>=
50.0
)
{
Seq
(
new
ConcreteRun
(
nextRunId
,
feasibleElem
,
run
.
target
,
debugMode
))
Seq
(
new
ConcreteRun
(
nextRunId
,
feasibleElem
,
run
.
target
,
debugMode
,
deleteOnFail
))
}
else
{
Seq
()
}
...
...
@@ -199,7 +200,7 @@ private class ConcreteExploration(
space
.
enumerate
foreach
{
e
=>
val
util
=
AreaUtilization
(
target
,
e
.
composition
)
require
(
util
.
nonEmpty
,
"area estimate must be known for all elements"
)
val
run
=
new
ConcreteRun
(
nextRunId
,
e
,
target
,
debugMode
)
val
run
=
new
ConcreteRun
(
nextRunId
,
e
,
target
,
debugMode
,
deleteOnFail
)
if
(
q
.
find
(
r
=>(
r
compare
run
)
==
0
).
isEmpty
)
{
publish
(
Exploration
.
Events
.
RunDefined
(
e
,
util
.
get
))
q
.
enqueue
(
run
)
...
...
@@ -232,8 +233,9 @@ object Exploration {
designFrequency
:
Heuristics.Frequency
,
batchSize
:
Int
=
MAX_BATCH_SZ
,
basePath
:
Path
,
debugMode
:
Option
[
String
]
=
None
)
(
implicit
cfg
:
Configuration
,
tsk
:
Tasks
)
:
Exploration
=
new
ConcreteExploration
(
initialComposition
,
target
,
dimensions
,
designFrequency
,
batchSize
,
basePath
,
debugMode
)
debugMode
:
Option
[
String
]
=
None
,
deleteOnFail
:
Boolean
=
false
)
(
implicit
cfg
:
Configuration
,
tsk
:
Tasks
)
:
Exploration
=
new
ConcreteExploration
(
initialComposition
,
target
,
dimensions
,
designFrequency
,
batchSize
,
basePath
,
debugMode
,
deleteOnFail
)
// scalastyle:on parameter.number
final
val
MAX_BATCH_SZ
:
Int
=
10
// FIXME use Compose.maxNumberOfThreads
...
...
src/main/scala/tapasco/dse/Run.scala
View file @
868c3d53
...
...
@@ -35,7 +35,7 @@ sealed private trait Run extends Startable with Ordered[Run] {
(
that
.
area
.
utilization
,
that
.
element
.
h
,
that
.
element
.
frequency
)
}
private
class
ConcreteRun
(
val
no
:
Int
,
val
element
:
DesignSpace.Element
,
val
target
:
Target
,
val
debugMode
:
Option
[
String
])
private
class
ConcreteRun
(
val
no
:
Int
,
val
element
:
DesignSpace.Element
,
val
target
:
Target
,
val
debugMode
:
Option
[
String
]
,
val
deleteOnFail
:
Boolean
=
false
)
(
implicit
exploration
:
Exploration
,
configuration
:
Configuration
)
extends
Run
{
private
[
this
]
var
_result
:
Option
[
Composer.Result
]
=
None
private
[
this
]
var
_task
:
Option
[
ComposeTask
]
=
None
...
...
@@ -57,7 +57,7 @@ private class ConcreteRun(val no: Int, val element: DesignSpace.Element, val tar
logFile
=
Some
(
"%s/%s/%s.log"
.
format
(
exploration
.
basePath
,
id
,
id
)),
debugMode
=
debugMode
,
onComplete
=
res
=>
stop
(
signal
),
deleteOnFail
=
true
)
deleteOnFail
=
deleteOnFail
)
_task
=
Some
(
t
)
exploration
.
publish
(
Exploration
.
Events
.
RunStarted
(
element
,
t
))
exploration
.
tasks
(
t
)
// start task
...
...
src/main/scala/tapasco/jobs/executors/DesignSpaceExploration.scala
View file @
868c3d53
...
...
@@ -110,6 +110,6 @@ private object DesignSpaceExploration extends Executor[DesignSpaceExplorationJob
None
,
// logfile
job
.
debugMode
,
onComplete
,
deleteOnFail
=
job
.
deleteProjects
getOrElse
(
false
)
deleteOnFail
=
job
.
deleteProjects
getOrElse
false
)
}
src/main/scala/tapasco/task/DesignSpaceExplorationTask.scala
View file @
868c3d53
...
...
@@ -75,7 +75,8 @@ private class DesignSpaceExplorationTask(
designFrequency
,
batchSize
,
_bp
,
debugMode
debugMode
,
deleteOnFail
)(
_cfg
,
tsk
)
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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