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
13e4d93a
Commit
13e4d93a
authored
Mar 20, 2015
by
Peter van 't Hof
Browse files
Added a retry method
parent
9f2940e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
13e4d93a
...
...
@@ -36,12 +36,15 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
val
defaultThreads
=
1
var
vmem
:
Option
[
String
]
=
config
(
"vmem"
)
va
r
defaultCoreMemory
:
Double
=
1.0
protected
va
l
defaultCoreMemory
:
Double
=
1.0
var
vmemFactor
:
Double
=
config
(
"vmem_factor"
,
default
=
this
match
{
case
_:
BiopetJavaCommandLineFunction
=>
2.5
case
_
=>
1.5
})
private
var
coreMemory
:
Double
=
config
(
"core_memory"
,
default
=
defaultCoreMemory
)
var
executable
:
String
=
_
/**
...
...
@@ -62,20 +65,24 @@ 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
)
{
val
vmemTemp
=
defaultCoreMemory
*
vmemFactor
vmem
=
Some
(
vmemTemp
+
"G"
)
}
if
(
vmem
.
isEmpty
)
vmem
=
Some
((
defaultCoreMemory
*
vmemFactor
)
+
"G"
)
if
(
vmem
.
isDefined
)
jobResourceRequests
:+=
"h_vmem="
+
vmem
.
get
jobName
=
configName
+
":"
+
(
if
(
firstOutput
!=
null
)
firstOutput
.
getName
else
jobOutputFile
)
super
.
freezeFieldValues
()
}
override
def
setupRetry
()
:
Unit
=
{
super
.
setupRetry
()
coreMemory
+=
1.0
vmemFactor
+=
0.5
memoryLimit
=
Some
(
coreMemory
*
threads
)
vmem
=
Some
((
defaultCoreMemory
*
vmemFactor
)
+
"G"
)
jobResourceRequests
:+=
"h_vmem="
+
vmem
.
get
}
/** can override this value is executable may not be converted to CanonicalPath */
val
executableToCanonicalPath
=
true
...
...
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