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
664201b6
Commit
664201b6
authored
Mar 20, 2015
by
Peter van 't Hof
Browse files
Changed memory limit aproach
parent
9133b3b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
664201b6
...
...
@@ -35,8 +35,13 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
var
threads
=
0
val
defaultThreads
=
1
var
vmem
:
Option
[
String
]
=
None
val
defaultVmem
:
String
=
""
var
vmem
:
Option
[
String
]
=
config
(
"vmem"
)
var
defaultCoreMemory
:
Double
=
1.0
var
vmemFactor
:
Double
=
config
(
"vmem_factor"
,
default
=
this
match
{
case
_:
BiopetJavaCommandLineFunction
=>
2.5
case
_
=>
1.5
})
var
executable
:
String
=
_
/**
...
...
@@ -57,9 +62,13 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
if
(
threads
==
0
)
threads
=
getThreads
(
defaultThreads
)
if
(
threads
>
1
)
nCoresRequest
=
Option
(
threads
)
val
coreMemory
:
Double
=
config
(
"core_memory"
,
default
=
defaultCoreMemory
)
if
(
memoryLimit
.
isEmpty
)
memoryLimit
=
Some
(
coreMemory
*
threads
)
if
(
vmem
.
isEmpty
)
{
vmem
=
config
(
"vmem"
)
if
(
vmem
.
isEmpty
&&
defaultVmem
.
nonEmpty
)
vmem
=
Some
(
defaultVmem
)
val
vmemTemp
=
defaultCoreMemory
*
vmemFactor
vmem
=
Some
(
vmemTemp
+
"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