- lines[i].start = int (sqrt(float(i)/float(processors)) * numGroups);
- lines[i].end = int (sqrt(float(i+1)/float(processors)) * numGroups);
- }
-
if (subsample) {
if (subsampleSize == -1) { //user has not set size, set size = smallest samples size
subsampleSize = lookup[0]->getNumSeqs();
if (subsample) {
if (subsampleSize == -1) { //user has not set size, set size = smallest samples size
subsampleSize = lookup[0]->getNumSeqs();
@@ -601,8+594,17 @@ int TreeGroupCommand::makeSimsShared() {
lookup = temp;
m->setGroups(Groups);
}
lookup = temp;
m->setGroups(Groups);
}
+
+ 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();
+ lines.resize(processors);
+ for (int i = 0; i < processors; i++) {
+ lines[i].start = int (sqrt(float(i)/float(processors)) * numGroups);
+ lines[i].end = int (sqrt(float(i+1)/float(processors)) * numGroups);