]> git.donarmstrong.com Git - mothur.git/commitdiff
cluster.split fix
authorwestcott <westcott>
Fri, 5 Nov 2010 19:26:09 +0000 (19:26 +0000)
committerwestcott <westcott>
Fri, 5 Nov 2010 19:26:09 +0000 (19:26 +0000)
25 files changed:
Mothur.xcodeproj/project.pbxproj
aligncommand.cpp
bellerophon.cpp
chimeraccodecommand.cpp
chimeracheckcommand.cpp
chimerapintailcommand.cpp
chimeraslayercommand.cpp
classifyseqscommand.cpp
clustersplitcommand.cpp
distancecommand.cpp
filterseqscommand.cpp
metastatscommand.cpp
mothur
pairwiseseqscommand.cpp
phylodiversitycommand.cpp
pintail.cpp
rarefact.cpp
screenseqscommand.cpp
seqsummarycommand.cpp
splitmatrix.cpp
summarysharedcommand.cpp
trimseqscommand.cpp
unifracweightedcommand.cpp
unweighted.cpp
weighted.cpp

index 855dad891d3b9b4e3b0422e57a3a5be488aa3c12..1c282d96b81dd6ee49eb177225076ffa91ef8894 100644 (file)
                        };
                        buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Mothur" */;
                        compatibilityVersion = "Xcode 3.0";
+                       developmentRegion = English;
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
index 624aab439855f60d9072889ae2cd80b33dae320e..87ca6cbf64f873797aebb733ebb727b2e6f840f0 100644 (file)
@@ -850,7 +850,11 @@ int AlignCommand::createProcesses(string alignFileName, string reportFileName, s
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index 4f48d9ce03b64ec2a5c1f52d4d3ef2feaab9d8a5..761d291da566aa1495b4f4a8e75079f1a619a617 100644 (file)
@@ -373,7 +373,11 @@ int Bellerophon::createProcesses(vector<int> mid) {
                                string tempOut = outputDir + toString(getpid()) + ".temp";
                                writePrefs(tempOut, lines[process]);
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index 5f90a084be41767698fb2b231fca4e13deca2942..286681a51d78de92590d7677a2e67a3c70fcaec1 100644 (file)
@@ -597,7 +597,11 @@ int ChimeraCcodeCommand::createProcesses(string outputFileName, string filename,
                                out.close();
 
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index b3f49a4916056a3b9e9ddb881f041513507c49d2..abf6b90c161671a231c370caa55c20f317319b60 100644 (file)
@@ -572,7 +572,11 @@ int ChimeraCheckCommand::createProcesses(string outputFileName, string filename)
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index b355f6da6ac5839a054d4503e4dbb4f43237c23a..abab7a3ddc9dba00b9981cc1df7b464084be902b 100644 (file)
@@ -678,7 +678,11 @@ int ChimeraPintailCommand::createProcesses(string outputFileName, string filenam
                                out.close();
 
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index dbdd4a9eeca506fab01005f2cf752452beb8310a..cd84bdca5f27726b9547b58c429afe74112fee84 100644 (file)
@@ -610,7 +610,11 @@ int ChimeraSlayerCommand::createProcesses(string outputFileName, string filename
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index b8d5b8efdc1d086a556c6ff0ea07332fd4470cf8..3876c6c59066ee74da67ff673a8cbb5ab3501d54 100644 (file)
@@ -757,7 +757,11 @@ int ClassifySeqsCommand::createProcesses(string taxFileName, string tempTaxFile,
                                out.close();
 
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index 6b5012abaa755ad9c72e61d4ece9ad488782b5bd..85a183aca409f65e3cb0e605d5ae777d10efe665 100644 (file)
@@ -885,7 +885,11 @@ int ClusterSplitCommand::createProcesses(vector < vector < map<string, string> >
                                outLabels.close();
 
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index 07d7f0f957859225727e598a0ebba660efe07b7c..edb6314427a423f216ab5ab6576305d8c0b51687 100644 (file)
@@ -423,6 +423,21 @@ int DistanceCommand::execute(){
                        else { driver(0, numSeqs, outputFile, "square");  }
                }else{ //you have multiple processors
                        
+                       unsigned long int numDists = 0;
+                       
+                       if (output == "square") {
+                                numDists = numSeqs * numSeqs;
+                       }else {
+                               for(int i=0;i<numSeqs;i++){
+                                       for(int j=0;j<i;j++){
+                                               numDists++;
+                                               if (numDists > processors) { break; }
+                                       }
+                               }
+                       }
+                       
+                       if (numDists < processors) { processors = numDists; }
+                       
                        for (int i = 0; i < processors; i++) {
                                lines.push_back(new linePair());
                                if (output != "square") {
@@ -432,19 +447,10 @@ int DistanceCommand::execute(){
                                        lines[i]->start = int ((float(i)/float(processors)) * numSeqs);
                                        lines[i]->end = int ((float(i+1)/float(processors)) * numSeqs);
                                }
+                               //cout << i << '\t' << lines[i]->start << '\t' << lines[i]->end << endl;
                        }
 
                        createProcesses(outputFile); 
-               
-                       map<int, int>::iterator it = processIDS.begin();
-                       rename((outputFile + toString(it->second) + ".temp").c_str(), outputFile.c_str());
-                       it++;
-                       
-                       //append and remove temp files
-                       for (; it != processIDS.end(); it++) {
-                               m->appendFiles((outputFile + toString(it->second) + ".temp"), outputFile);
-                               remove((outputFile + toString(it->second) + ".temp").c_str());
-                       }
                }
        #else
                //ifstream inFASTA;
@@ -526,7 +532,7 @@ int DistanceCommand::execute(){
 void DistanceCommand::createProcesses(string filename) {
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
-               int process = 0;
+               int process = 1;
                processIDS.clear();
                
                //loop through and create all the processes you want
@@ -540,14 +546,29 @@ void DistanceCommand::createProcesses(string filename) {
                                if (output != "square") {  driver(lines[process]->start, lines[process]->end, filename + toString(getpid()) + ".temp", cutoff); }
                                else { driver(lines[process]->start, lines[process]->end, filename + toString(getpid()) + ".temp", "square"); }
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes. Error code: " + toString(pid)); m->mothurOutEndLine(); 
+                               for (map<int, int>::iterator it = processIDS.begin(); it != processIDS.end(); it++) { int temp = it->second; kill (temp, SIGINT); }
+                               exit(0);
+                       }
                }
-       
+               
+               //parent does its part
+               if (output != "square") {  driver(lines[0]->start, lines[0]->end, filename, cutoff); }
+               else { driver(lines[0]->start, lines[0]->end, filename, "square"); }
+               
+               
                //force parent to wait until all the processes are done
                for (map<int, int>::iterator it = processIDS.begin(); it != processIDS.end(); it++) { 
                        int temp = it->second;
                        wait(&temp);
                }
+               
+               //append and remove temp files
+               for (map<int, int>::iterator it = processIDS.begin(); it != processIDS.end(); it++) {
+                       m->appendFiles((filename + toString(it->second) + ".temp"), filename);
+                       remove((filename + toString(it->second) + ".temp").c_str());
+               }
 #endif
        }
        catch(exception& e) {
index c4a3a95fe7d2cff8948650ebabea4290fbaa742a..b9436f8078df0da22408dafc889d16e62d8a7d6c 100644 (file)
@@ -610,7 +610,11 @@ int FilterSeqsCommand::createProcessesRunFilter(string F, string filename) {
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
@@ -974,7 +978,11 @@ int FilterSeqsCommand::createProcessesCreateFilter(Filters& F, string filename)
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //parent do your part
index 2078584426ffecc4a445a7486825af7fc7bb0077..a734ce3a6c9e01a89f6d99e1ff2bd1236b1c944a 100644 (file)
@@ -366,7 +366,11 @@ int MetaStatsCommand::process(vector<SharedRAbundVector*>& thisLookUp){
                                                }else if (pid == 0){
                                                        driver(lines[process].start, lines[process].num, thisLookUp);
                                                        exit(0);
-                                               }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                                               }else { 
+                                                       m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                                                       for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                                                       exit(0);
+                                               }
                                        }
                                        
                                        //do my part
diff --git a/mothur b/mothur
index b0584ed9528306140df5d6667109738ff65f46ce..6d8214658dae4debb9669f7f138585e9d4ae7408 100755 (executable)
Binary files a/mothur and b/mothur differ
index aed03cd9ea273fe5e42413fc1c709abe01983e94..18412fdeac778159551d32e8573edd1dddc321bf 100644 (file)
@@ -536,7 +536,11 @@ void PairwiseSeqsCommand::createProcesses(string filename) {
                                if (output != "square") {  driver(lines[process]->start, lines[process]->end, filename + toString(getpid()) + ".temp", cutoff); }
                                else { driver(lines[process]->start, lines[process]->end, filename + toString(getpid()) + ".temp", "square"); }
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (map<int, int>::iterator it = processIDS.begin(); it != processIDS.end(); it++) { int temp = it->second; kill (temp, SIGINT); }
+                               exit(0);
+                       }
                }
        
                //force parent to wait until all the processes are done
index efa14cd7069266ebfedb41018de0120327a145a9..a97e09564d6cbf27d67b57fa461469096237f354 100644 (file)
@@ -322,7 +322,11 @@ int PhyloDiversityCommand::createProcesses(vector<int>& procIters, Tree* t, map<
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                driver(t, div, sumDiv, procIters[0], increment, randomLeaf, numSampledList, outCollect, outSum, true);
index c0ea90436628e8a86dbce69f894d8f3a353b7a27..2fa1ca7cec9c27fa68af9c9ed07c6e438eff0531 100644 (file)
@@ -560,7 +560,11 @@ void Pintail::createProcessesQuan() {
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //parent does its part
index d04885f4333e3f224bddbfa99aa9614e9f171b4c..ec77dd57f2ce811bcac6fa588ee715114eb10f1c 100644 (file)
@@ -137,7 +137,11 @@ int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd,
                                        displays[i]->outputTempFiles(tempFile);
                                }
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                driver(rcd, increment, procIters[0]);
index 30dda1f68518bf395ae0cbb892cf71a3a7ded4d5..98b6681d5091ffbb30b80172c0a36d12a531d130 100644 (file)
@@ -721,7 +721,11 @@ int ScreenSeqsCommand::createProcessesCreateSummary(vector<int>& startPosition,
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                num = driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, fastafile, lines[0]);
@@ -1046,7 +1050,11 @@ int ScreenSeqsCommand::createProcesses(string goodFileName, string badAccnos, st
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index 5776b970e6475bf74252d357ff1fef028902a797..7edb717853461ba4cd23f9845b36880dd9ce38ae 100644 (file)
@@ -505,7 +505,11 @@ int SeqSummaryCommand::createProcessesCreateSummary(vector<int>& startPosition,
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index dcc5b50ef8b396d9186c755c3ba949f9c789cf64..ec71e5bfd0090b1172d50403a6b54903a030c3f4 100644 (file)
@@ -77,7 +77,7 @@ int SplitMatrix::splitDistance(){
 int SplitMatrix::splitClassify(){
        try {
                cutoff = int(cutoff);
-               
+                               
                map<string, int> seqGroup;
                map<string, int>::iterator it;
                map<string, int>::iterator it2;
@@ -182,7 +182,7 @@ int SplitMatrix::createDistanceFilesFromTax(map<string, int>& seqGroup, int numG
                //process each distance file
                for (int i = 0; i < numGroups; i++) { 
                        
-                       string options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", cutoff=" + toString(distCutoff);
+                       string options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(1) + ", cutoff=" + toString(distCutoff);
                        
                        Command* command = new DistanceCommand(options);
                        command->execute();
index 32a9f7c2ebee2019ed3421eba21d42c4197087d0..956e0805ee7a20ff5266cf4eba67632dbec7d722 100644 (file)
@@ -508,7 +508,11 @@ int SummarySharedCommand::process(vector<SharedRAbundVector*> thisLookup, string
                                                        }
                                                        
                                                        exit(0);
-                                               }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                                               }else { 
+                                                       m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                                                       for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                                                       exit(0);
+                                               }
                                        }
                                        
                                        //parent do your part
index 4e7a12994f4854c487d036dd422aa1f3130e288c..8aacd9d7c78b767acbf7c00ab92f945dff11dc2d 100644 (file)
@@ -714,7 +714,11 @@ int TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFileName
                        }else if (pid == 0){
                                driverCreateTrim(filename, qFileName, (trimFile + toString(getpid()) + ".temp"), (scrapFile + toString(getpid()) + ".temp"), (trimQFile + toString(getpid()) + ".temp"), (scrapQFile + toString(getpid()) + ".temp"), (groupFile + toString(getpid()) + ".temp"), fastaNames, qualNames, lines[process], qLines[process]);
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
index 33a0e6dd9a3128541ab57777125251a97effdefc..df73c9389b99b7ba18725d418d62b36184efa398 100644 (file)
@@ -349,7 +349,11 @@ int UnifracWeightedCommand::createProcesses(Tree* t, vector< vector<string> > na
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, scores);
index 0ac7147d7d8b0b288789267c18c43e1867b43e93..ef9e52188ed32bcea6bf009231bf6c9a0c26ee4a 100644 (file)
@@ -116,7 +116,11 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0); 
+                       }
                }
                
                results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num);
@@ -363,7 +367,11 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0); 
+                       }
                }
                
                results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, usingGroups);
index 6cbeae8572010f36d943121e0aceb689a460e444..1ac274619bf2c8971ea7f17ddb03c8cf98dde0ed 100644 (file)
@@ -104,7 +104,11 @@ EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGro
                                out.close();
                                
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
        
                results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num);