]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraccodecommand.cpp
mods for 1.16
[mothur.git] / chimeraccodecommand.cpp
index 5f90a084be41767698fb2b231fca4e13deca2942..223ddb23c1bec61748ce62217001dfac04b565ac 100644 (file)
@@ -272,7 +272,7 @@ int ChimeraCcodeCommand::execute(){
                        
                #ifdef USE_MPI
                
-                               int pid, end, numSeqsPerProcessor; 
+                               int pid, numSeqsPerProcessor; 
                                int tag = 2001;
                                vector<unsigned long int> MPIPos;
                                                                
@@ -550,7 +550,7 @@ int ChimeraCcodeCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_File
                                        if (m->control_pressed) {       delete candidateSeq; return 1;  }
                
                                        //print results
-                                       bool isChimeric = chimera->print(outMPI, outAccMPI);
+                                       chimera->print(outMPI, outAccMPI);
                                }
                        }
                        delete candidateSeq;
@@ -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