vector<double> D;
processors = p;
outputDir = o;
+
+ TreeMap* tmap = t->getTreeMap();
numGroups = m->getNumGroups();
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
if(processors == 1){
- data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size());
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), tmap);
}else{
int numPairs = namesOfGroupCombos.size();
lines.push_back(linePair(startPos, numPairsPerProcessor));
}
- data = createProcesses(t, namesOfGroupCombos);
+ data = createProcesses(t, namesOfGroupCombos, tmap);
lines.clear();
}
#else
- data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size());
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), tmap);
#endif
return data;
}
/**************************************************************************************************/
-EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGroupCombos) {
+EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGroupCombos, TreeMap* tmap) {
try {
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
int process = 1;
}else if (pid == 0){
EstOutput Myresults;
- Myresults = driver(t, namesOfGroupCombos, lines[process].start, lines[process].num);
+ Myresults = driver(t, namesOfGroupCombos, lines[process].start, lines[process].num, tmap);
//m->mothurOut("Merging results."); m->mothurOutEndLine();
}
}
- results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num);
+ results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, tmap);
//force parent to wait until all the processes are done
for (int i=0;i<(processors-1);i++) {
}
}
/**************************************************************************************************/
-EstOutput Weighted::driver(Tree* t, vector< vector<string> > namesOfGroupCombos, int start, int num) {
+EstOutput Weighted::driver(Tree* t, vector< vector<string> > namesOfGroupCombos, int start, int num, TreeMap* tmap) {
try {
EstOutput results;
vector<double> D;
try {
data.clear(); //clear out old values
+
+ TreeMap* tmap = t->getTreeMap();
if (m->control_pressed) { return data; }