Setting the walltime
Signed-off-by: Joel Thibault <thibault@broadinstitute.org>
This commit is contained in:
parent
f837e6ced7
commit
daf6269b65
|
|
@ -31,6 +31,10 @@ import org.broadinstitute.sting.commandline.{ClassType, Argument}
|
|||
* Default settings settable on the command line and passed to CommandLineFunctions.
|
||||
*/
|
||||
class QSettings {
|
||||
|
||||
@Argument(fullName="job_walltime", shortName="wallTime", doc="Setting the required walltime when using the drmaa job runner.", required=false)
|
||||
var jobWalltime: Option[Long] = None
|
||||
|
||||
@Argument(fullName="run_name", shortName="runName", doc="A name for this run used for various status messages.", required=false)
|
||||
var runName: String = _
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ class DrmaaJobRunner(val session: Session, val function: CommandLineFunction) ex
|
|||
drmaaJob.setJoinFiles(true)
|
||||
}
|
||||
|
||||
if(function.wallTime != null)
|
||||
drmaaJob.setHardWallclockTimeLimit(function.wallTime.get)
|
||||
|
||||
drmaaJob.setNativeSpecification(functionNativeSpec)
|
||||
|
||||
// Instead of running the function.commandLine, run "sh <jobScript>"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ import org.broadinstitute.sting.commandline.Argument
|
|||
trait CommandLineFunction extends QFunction with Logging {
|
||||
def commandLine: String
|
||||
|
||||
/** Setting the wall time request for drmaa job*/
|
||||
var wallTime: Option[Long] = None
|
||||
|
||||
/** Upper memory limit */
|
||||
@Argument(doc="Memory limit", required=false)
|
||||
var memoryLimit: Option[Double] = None
|
||||
|
|
@ -67,6 +70,9 @@ trait CommandLineFunction extends QFunction with Logging {
|
|||
super.copySettingsTo(function)
|
||||
function match {
|
||||
case commandLineFunction: CommandLineFunction =>
|
||||
if(commandLineFunction.wallTime.isEmpty)
|
||||
commandLineFunction.wallTime = this.wallTime
|
||||
|
||||
if (commandLineFunction.memoryLimit.isEmpty)
|
||||
commandLineFunction.memoryLimit = this.memoryLimit
|
||||
|
||||
|
|
@ -110,6 +116,10 @@ trait CommandLineFunction extends QFunction with Logging {
|
|||
* Sets all field values.
|
||||
*/
|
||||
override def freezeFieldValues() {
|
||||
|
||||
if(wallTime.isEmpty)
|
||||
wallTime = qSettings.jobWalltime
|
||||
|
||||
if (jobQueue == null)
|
||||
jobQueue = qSettings.jobQueue
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue