From 93cf8461920ec60627edb94d366f0683d7a2d33c Mon Sep 17 00:00:00 2001 From: pvtroshin Date: Fri, 23 Jul 2010 13:15:01 +0000 Subject: [PATCH] Jronn multi core support git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@2666 e3abac25-378b-4346-85de-24260fe3988d --- runner/compbio/runner/disorder/Jronn.java | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/runner/compbio/runner/disorder/Jronn.java b/runner/compbio/runner/disorder/Jronn.java index e98ac3a..57cf9f6 100644 --- a/runner/compbio/runner/disorder/Jronn.java +++ b/runner/compbio/runner/disorder/Jronn.java @@ -186,19 +186,19 @@ public class Jronn extends SkeletalExecutable { @Override public CommandBuilder getParameters(ExecProvider provider) { - // Limit number of cores to 1 for ANY execution which does not set - // Ncores explicitly using setNCore method - if (ncoreNumber == 0) { - setNCore(1); - } - // If number of cores is provided, set it for the cluster execution only! - if (provider == Executable.ExecProvider.Cluster) { - int cpunum = SkeletalExecutable.getClusterCpuNum(getType()); - if (cpunum != 0) { - setNCore(cpunum); - } - } - return super.getParameters(provider); + // If number of cores is provided, set it for the cluster execution only! + if (provider == Executable.ExecProvider.Cluster) { + int cpunum = SkeletalExecutable.getClusterCpuNum(getType()); + cpunum = (cpunum==0) ? 1 : cpunum; + setNCore(cpunum); + } else { + // Limit number of cores to 1 for ANY execution which does not set + // Ncores explicitly using setNCore method or is run on local VM + if(ncoreNumber==0) { + setNCore(1); + } + } + return super.getParameters(provider); } } -- 1.7.10.2