Commit 2ada4499 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Better memory handling for pipes

parent 2da7887f
...@@ -44,8 +44,14 @@ class BiopetPipe(val commands: List[BiopetCommandLineFunction]) extends BiopetCo ...@@ -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(", ")) 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 defaultCoreMemory = {
override def defaultThreads = commands.map(_.defaultThreads).sum (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 val root: Configurable = commands.head.root
override def configName = commands.map(_.configName).mkString("-") override def configName = commands.map(_.configName).mkString("-")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment