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
3482754f
Commit
3482754f
authored
Sep 22, 2015
by
Peter van 't Hof
Browse files
Made codeMemory readable from outside
parent
c1f9f9e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
3482754f
...
...
@@ -44,7 +44,8 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
var
residentFactor
:
Double
=
config
(
"resident_factor"
,
default
=
1.2
)
private
var
coreMemory
:
Double
=
_
private
var
_coreMemory
:
Double
=
2.0
def
coreMemeory
=
_coreMemory
var
executable
:
String
=
_
...
...
@@ -66,15 +67,15 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
if
(
threads
==
0
)
threads
=
getThreads
(
defaultThreads
)
if
(
threads
>
1
)
nCoresRequest
=
Option
(
threads
)
coreMemory
=
config
(
"core_memory"
,
default
=
defaultCoreMemory
).
asDouble
+
(
0.5
*
retry
)
_
coreMemory
=
config
(
"core_memory"
,
default
=
defaultCoreMemory
).
asDouble
+
(
0.5
*
retry
)
if
(
config
.
contains
(
"memory_limit"
))
memoryLimit
=
config
(
"memory_limit"
)
else
memoryLimit
=
Some
(
coreMemory
*
threads
)
else
memoryLimit
=
Some
(
_
coreMemory
*
threads
)
if
(
config
.
contains
(
"resident_limit"
))
residentLimit
=
config
(
"resident_limit"
)
else
residentLimit
=
Some
((
coreMemory
+
(
0.5
*
retry
))
*
residentFactor
)
else
residentLimit
=
Some
((
_
coreMemory
+
(
0.5
*
retry
))
*
residentFactor
)
if
(!
config
.
contains
(
"vmem"
))
vmem
=
Some
((
coreMemory
*
(
vmemFactor
+
(
0.5
*
retry
)))
+
"G"
)
if
(!
config
.
contains
(
"vmem"
))
vmem
=
Some
((
_
coreMemory
*
(
vmemFactor
+
(
0.5
*
retry
)))
+
"G"
)
if
(
vmem
.
isDefined
)
jobResourceRequests
:+=
"h_vmem="
+
vmem
.
get
jobName
=
configName
+
":"
+
(
if
(
firstOutput
!=
null
)
firstOutput
.
getName
else
jobOutputFile
)
...
...
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