]> git.donarmstrong.com Git - mothur.git/blobdiff - unifracweightedcommand.cpp
fixed unifrac bug with multiple processors if numComps was less than processors....
[mothur.git] / unifracweightedcommand.cpp
index 4c387da9332c6ca280a9359105cf8dfa837cd0a9..1fa1a2833c1fa7604a9e2cbb07bf255ace9dcd94 100644 (file)
@@ -187,6 +187,8 @@ int UnifracWeightedCommand::execute() {
                //get weighted for users tree
                userData.resize(numComp,0);  //data[0] = weightedscore AB, data[1] = weightedscore AC...
                randomData.resize(numComp,0); //data[0] = weightedscore AB, data[1] = weightedscore AC...
+               
+               if (numComp < processors) { processors = numComp; }
                                
                //get weighted scores for users trees
                for (int i = 0; i < T.size(); i++) {