if(i == processors - 1){
numPairsPerProcessor = numPairs - i * numPairsPerProcessor;
}
- lines.push_back(new linePair(startPos, numPairsPerProcessor));
+ lines.push_back(linePair(startPos, numPairsPerProcessor));
}
data = createProcesses(t, namesOfGroupCombos, sums);
- for (int i = 0; i < lines.size(); i++) { delete lines[i]; } lines.clear();
+ lines.clear();
}
#else
data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), sums);
}else if (pid == 0){
EstOutput Myresults;
- Myresults = driver(t, namesOfGroupCombos, lines[process]->start, lines[process]->num, sums);
+ Myresults = driver(t, namesOfGroupCombos, lines[process].start, lines[process].num, sums);
m->mothurOut("Merging results."); m->mothurOutEndLine();
}else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
}
- results = driver(t, namesOfGroupCombos, lines[0]->start, lines[0]->num, sums);
+ results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, sums);
//force parent to wait until all the processes are done
for (int i=0;i<(processors-1);i++) {
//calculate u for the group comb
int total = t->getNumNodes();
int twentyPercent = (total * 0.20);
+
for(int i=0;i<t->getNumNodes();i++){
for (int h = start; h < (start+num); h++) {