Commit a16e109d authored by bow's avatar bow

Merge branch 'fix-core_memory' into 'develop'

Added option to correct memory for threads

Fixes #376 

See merge request !439
parents edc81be3 4cab61ef
......@@ -31,6 +31,9 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
t
}
val multiplyVmemThreads: Boolean = config("multiply_vmem_threads", default = true)
val multiplyRssThreads: Boolean = config("multiply_rss_threads", default = true)
var vmem: Option[String] = config("vmem")
def defaultCoreMemory: Double = 2.0
def defaultVmemFactor: Double = 1.4
......@@ -84,9 +87,10 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
else memoryLimit = Some(_coreMemory * threads)
if (config.contains("resident_limit")) residentLimit = config("resident_limit")
else residentLimit = Some((_coreMemory + (0.5 * retryMultipler)) * residentFactor)
else residentLimit = Some((_coreMemory + (0.5 * retryMultipler)) * residentFactor * (if (multiplyRssThreads) threads else 1))
if (!config.contains("vmem")) vmem = Some((_coreMemory * (vmemFactor + (0.5 * retryMultipler))) + "G")
if (!config.contains("vmem"))
vmem = Some((_coreMemory * (vmemFactor + (0.5 * retryMultipler)) * (if (multiplyVmemThreads) threads else 1)) + "G")
jobName = configNamespace + ":" + (if (firstOutput != null) firstOutput.getName else jobOutputFile)
}
......
......@@ -7,8 +7,8 @@ import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
/**
* Created by Sander Bollen on 13-7-16.
*/
* Created by Sander Bollen on 13-7-16.
*/
class HaploTypeCallerGvcfTest extends TestNGSuite with Matchers {
@Test
......
Markdown is supported
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