From 4eff69d95ef6219745cc763340c0458d4c7d6177 Mon Sep 17 00:00:00 2001 From: kshakir Date: Wed, 25 Aug 2010 15:18:02 +0000 Subject: [PATCH] Back to using the LSF job name during dry runs since when the real job ids weren't available '-w(null)' wasn't too informative. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4107 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/queue/engine/LsfJobRunner.scala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scala/src/org/broadinstitute/sting/queue/engine/LsfJobRunner.scala b/scala/src/org/broadinstitute/sting/queue/engine/LsfJobRunner.scala index 509a9450c..bedb147c3 100644 --- a/scala/src/org/broadinstitute/sting/queue/engine/LsfJobRunner.scala +++ b/scala/src/org/broadinstitute/sting/queue/engine/LsfJobRunner.scala @@ -46,7 +46,8 @@ class LsfJobRunner extends DispatchJobRunner with Logging { } if (previous.size > 0) - job.extraBsubArgs ++= List("-w", dependencyExpression(previous, function.jobRunOnlyIfPreviousSucceed)) + job.extraBsubArgs ++= List("-w", dependencyExpression(previous, + function.jobRunOnlyIfPreviousSucceed, qGraph.dryRun)) addJob(function, qGraph, job, previous) @@ -64,10 +65,16 @@ class LsfJobRunner extends DispatchJobRunner with Logging { * Returns the dependency expression for the prior jobs. * @param jobs Previous jobs this job is dependent on. * @param runOnSuccess Run the job only if the previous jobs succeed. + * @param dryRun If the current run is a dry run. * @return The dependency expression for the prior jobs. */ - private def dependencyExpression(jobs: Iterable[LsfJob], runOnSuccess: Boolean) = { - val jobIds = jobs.toSet[LsfJob].map(_.bsubJobId) + private def dependencyExpression(jobs: Iterable[LsfJob], + runOnSuccess: Boolean, dryRun: Boolean) = { + val jobIds = if (dryRun) + jobs.toSet[LsfJob].map("\"" + _.name + "\"") + else + jobs.toSet[LsfJob].map(_.bsubJobId) + if (runOnSuccess) jobIds.mkString("done(", ") && done(", ")") else