Jronn multi core support
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Fri, 23 Jul 2010 13:15:01 +0000 (13:15 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Fri, 23 Jul 2010 13:15:01 +0000 (13:15 +0000)
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

index e98ac3a..57cf9f6 100644 (file)
@@ -186,19 +186,19 @@ public class Jronn extends SkeletalExecutable<Jronn> {
 \r
     @Override\r
     public CommandBuilder<Jronn> getParameters(ExecProvider provider) {\r
-       // Limit number of cores to 1 for ANY execution which does not set\r
-       // Ncores explicitly using setNCore method\r
-       if (ncoreNumber == 0) {\r
-           setNCore(1);\r
-       }\r
-       // If number of cores is provided, set it for the cluster execution only!\r
-       if (provider == Executable.ExecProvider.Cluster) {\r
-           int cpunum = SkeletalExecutable.getClusterCpuNum(getType());\r
-           if (cpunum != 0) {\r
-               setNCore(cpunum);\r
-           }\r
-       }\r
-       return super.getParameters(provider);\r
+       // If number of cores is provided, set it for the cluster execution only!\r
+       if (provider == Executable.ExecProvider.Cluster) {\r
+               int cpunum = SkeletalExecutable.getClusterCpuNum(getType());\r
+               cpunum = (cpunum==0) ? 1 : cpunum; \r
+                       setNCore(cpunum);\r
+       } else { \r
+               // Limit number of cores to 1 for ANY execution which does not set\r
+               // Ncores explicitly using setNCore method or is run on local VM\r
+               if(ncoreNumber==0) {\r
+                       setNCore(1);\r
+               }\r
+       }\r
+       return super.getParameters(provider);\r
     }\r
 \r
 }\r