X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=treegroupscommand.cpp;h=80698f1b4b0317719421dbe9c4af3c0583bd9d97;hp=0119741988c010e0d3b3d3df1bbc4c052f5bba8f;hb=df7e3ff9f68ef157b0328a2d353c3258c5d45d89;hpb=af0a94ea8f02421b2b73e77e68753a2b4c37768e diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index 0119741..80698f1 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -662,8 +662,18 @@ int TreeGroupCommand::makeSimsShared() { if (lookup.size() < 2) { m->mothurOut("You have not provided enough valid groups. I cannot run the command."); m->mothurOutEndLine(); m->control_pressed = true; return 0; } } - numGroups = lookup.size(); + + //sanity check to make sure processors < numComparisions + int numDists = 0; + for(int i=0;i processors) { break; } + } + } + if (numDists < processors) { processors = numDists; } + lines.resize(processors); for (int i = 0; i < processors; i++) { lines[i].start = int (sqrt(float(i)/float(processors)) * numGroups); @@ -918,6 +928,8 @@ int TreeGroupCommand::process(vector thisLookup) { thisItersLookup.clear(); for (int i = 0; i < calcDists.size(); i++) { calcDists[i].clear(); } } + + if (m->debug) { m->mothurOut("[DEBUG]: iter = " + toString(thisIter) + ".\n"); } } if (m->debug) { m->mothurOut("[DEBUG]: done with iters.\n"); }