]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeracheckcommand.cpp
working on kendall
[mothur.git] / chimeracheckcommand.cpp
index b3f49a4916056a3b9e9ddb881f041513507c49d2..3104fac58c9b6c4ff9bc1dc4870fcc77c0541853 100644 (file)
@@ -301,7 +301,7 @@ int ChimeraCheckCommand::execute(){
                        
                #ifdef USE_MPI
                
-                               int pid, end, numSeqsPerProcessor; 
+                               int pid, numSeqsPerProcessor; 
                                int tag = 2001;
                                vector<unsigned long int> MPIPos;
                                
@@ -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