Bugfix for bad nt / nct argument detection in MicroScheduler
This commit is contained in:
parent
b57df6cac8
commit
97abb98c0b
|
|
@ -157,18 +157,22 @@ public abstract class MicroScheduler implements MicroSchedulerMBean {
|
||||||
|
|
||||||
if ( ! (walker instanceof TreeReducible) ) {
|
if ( ! (walker instanceof TreeReducible) ) {
|
||||||
throw badNT("nt", engine, walker);
|
throw badNT("nt", engine, walker);
|
||||||
} else {
|
|
||||||
return new HierarchicalMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( threadAllocation.getNumCPUThreadsPerDataThread() > 1 && ! (walker instanceof NanoSchedulable) ) {
|
||||||
|
throw badNT("nct", engine, walker);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( threadAllocation.getNumDataThreads() > 1 ) {
|
||||||
|
return new HierarchicalMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
||||||
} else {
|
} else {
|
||||||
if ( threadAllocation.getNumCPUThreadsPerDataThread() > 1 && ! (walker instanceof NanoSchedulable) )
|
|
||||||
throw badNT("nct", engine, walker);
|
|
||||||
return new LinearMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
return new LinearMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UserException badNT(final String parallelArg, final GenomeAnalysisEngine engine, final Walker walker) {
|
private static UserException badNT(final String parallelArg, final GenomeAnalysisEngine engine, final Walker walker) {
|
||||||
throw new UserException.BadArgumentValue("nt",
|
throw new UserException.BadArgumentValue(parallelArg,
|
||||||
String.format("The analysis %s currently does not support parallel execution with %s. " +
|
String.format("The analysis %s currently does not support parallel execution with %s. " +
|
||||||
"Please run your analysis without the %s option.", engine.getWalkerName(walker.getClass()), parallelArg, parallelArg));
|
"Please run your analysis without the %s option.", engine.getWalkerName(walker.getClass()), parallelArg, parallelArg));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue