|
@@ -73,7 +73,11 @@ public:
|
|
//PARALLEL(1) can be used to explicitly disable parallel processing.
|
|
//PARALLEL(1) can be used to explicitly disable parallel processing.
|
|
numStrands = container.queryXGMML().getPropInt("att[@name='parallel']/@value", 0);
|
|
numStrands = container.queryXGMML().getPropInt("att[@name='parallel']/@value", 0);
|
|
if ((numStrands == NotFound) || (numStrands > MAX_SENSIBLE_STRANDS))
|
|
if ((numStrands == NotFound) || (numStrands > MAX_SENSIBLE_STRANDS))
|
|
- numStrands = container.queryMaxCores();
|
|
|
|
|
|
+ {
|
|
|
|
+ unsigned channels = container.queryJob().queryJobChannels();
|
|
|
|
+ unsigned cores = container.queryMaxCores();
|
|
|
|
+ numStrands = (cores + (channels-1)) / channels; // i.e. round up
|
|
|
|
+ }
|
|
if (0 == numStrands)
|
|
if (0 == numStrands)
|
|
numStrands = container.queryJob().getOptInt("forceNumStrands");
|
|
numStrands = container.queryJob().getOptInt("forceNumStrands");
|
|
blockSize = container.queryJob().getOptInt("strandBlockSize");
|
|
blockSize = container.queryJob().getOptInt("strandBlockSize");
|