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
Mirrors
biopet.biopet
Commits
2ada4499
Commit
2ada4499
authored
Sep 22, 2015
by
Peter van 't Hof
Browse files
Better memory handling for pipes
parent
2da7887f
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala
View file @
2ada4499
...
...
@@ -44,8 +44,14 @@ class BiopetPipe(val commands: List[BiopetCommandLineFunction]) extends BiopetCo
require
(
inputOutput
.
isEmpty
,
"File found as input and output in the same job, files: "
+
inputOutput
.
mkString
(
", "
))
}
override
def
defaultCoreMemory
=
commands
.
map
(
_
.
defaultCoreMemory
).
sum
override
def
defaultThreads
=
commands
.
map
(
_
.
defaultThreads
).
sum
override
def
defaultCoreMemory
=
{
(
for
(
command
<-
commands
)
yield
{
val
threads
=
command
.
getThreads
(
command
.
defaultThreads
)
val
totalThreads
=
defaultThreads
(
threads
.
toDouble
/
totalThreads
.
toDouble
)
*
command
.
defaultCoreMemory
}).
sum
}
override
def
defaultThreads
=
commands
.
map
(
c
=>
c
.
getThreads
(
c
.
defaultThreads
)).
sum
val
root
:
Configurable
=
commands
.
head
.
root
override
def
configName
=
commands
.
map
(
_
.
configName
).
mkString
(
"-"
)
...
...
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