]> 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 8745a892b9a24db666d2356b4adf6f19065470d5..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++) {
@@ -261,7 +263,7 @@ int UnifracWeightedCommand::execute() {
                                        if (m->control_pressed) { delete output; outSum.close(); for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str());  } return 0; }
                                        
                                        //report progress
-                                       m->mothurOut("Iter: " + toString(j+1)); m->mothurOutEndLine();          
+//                                     m->mothurOut("Iter: " + toString(j+1)); m->mothurOutEndLine();          
                                }
                                lines.clear();