Skip to content
GitLab
Menu
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
a16e109d
Commit
a16e109d
authored
Jul 21, 2016
by
bow
Browse files
Merge branch 'fix-core_memory' into 'develop'
Added option to correct memory for threads Fixes #376 See merge request !439
parents
edc81be3
4cab61ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala
View file @
a16e109d
...
@@ -31,6 +31,9 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
...
@@ -31,6 +31,9 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
t
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"
)
var
vmem
:
Option
[
String
]
=
config
(
"vmem"
)
def
defaultCoreMemory
:
Double
=
2.0
def
defaultCoreMemory
:
Double
=
2.0
def
defaultVmemFactor
:
Double
=
1.4
def
defaultVmemFactor
:
Double
=
1.4
...
@@ -84,9 +87,10 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
...
@@ -84,9 +87,10 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
else
memoryLimit
=
Some
(
_coreMemory
*
threads
)
else
memoryLimit
=
Some
(
_coreMemory
*
threads
)
if
(
config
.
contains
(
"resident_limit"
))
residentLimit
=
config
(
"resident_limit"
)
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
)
jobName
=
configNamespace
+
":"
+
(
if
(
firstOutput
!=
null
)
firstOutput
.
getName
else
jobOutputFile
)
}
}
...
...
shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaploTypeCallerGvcfTest.scala
View file @
a16e109d
...
@@ -7,8 +7,8 @@ import org.scalatest.testng.TestNGSuite
...
@@ -7,8 +7,8 @@ import org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
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
{
class
HaploTypeCallerGvcfTest
extends
TestNGSuite
with
Matchers
{
@Test
@Test
...
...
Write
Preview
Supports
Markdown
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