]> git.donarmstrong.com Git - mothur.git/blobdiff - engine.cpp
changed groupfile in classify.seqs to reflect multiple fasta files
[mothur.git] / engine.cpp
index 2d5fd75959d479826f5239b364879ff316f4eaca..9e5801b1b057b2f2a1cc4a986e105ae3e73f14b5 100644 (file)
@@ -54,18 +54,8 @@ bool InteractEngine::getInput(){
                        mout->mothurOutEndLine();
                        
                        input = getCommand();   
-                       #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) {
-                       #endif
                        mout->mothurOutEndLine();       
                        
-                       #ifdef USE_MPI
-                               }
-                       #endif
-                       
                        if (mout->control_pressed) { input = "quit()"; }
                        
                        //allow user to omit the () on the quit command
@@ -117,89 +107,29 @@ string Engine::getCommand()  {
                                if(nextCommand != NULL) {  add_history(nextCommand);  } 
                                else{ //^D causes null string and we want it to quit mothur
                                        nextCommand = "quit"; 
-                                       cout << nextCommand << endl;
+                                       mout->mothurOut(nextCommand);
                                }       
                                
-                               #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) { //only one process should output to screen
-                               #endif
-
                                mout->mothurOutJustToLog("mothur > " + toString(nextCommand));
-                               
-                               #ifdef USE_MPI
-                                       }
-                               #endif
-                               
                                return nextCommand;
                        #else
                                string nextCommand = "";
-                               #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) { //only one process should output to screen
-                               #endif
-
                                mout->mothurOut("mothur > ");
-                               
-                               #ifdef USE_MPI
-                                       }
-                               #endif
-                               
                                getline(cin, nextCommand);
-                               
-                               #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) { //only one process should output to screen
-                               #endif
-                               
                                mout->mothurOutJustToLog("mothur > " + toString(nextCommand));
                                
-                               #ifdef USE_MPI
-                                       }
-                               #endif
-
                                return nextCommand;
                        #endif
                #else
-                       string nextCommand = "";
-                               #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) { //only one process should output to screen
-                               #endif
-
-                               mout->mothurOut("mothur > ");
-                               
-                               #ifdef USE_MPI
-                                       }
-                               #endif
+                               string nextCommand = "";
                                
+                               mout->mothurOut("mothur > ");
                                getline(cin, nextCommand);
-                               
-                               #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) { //only one process should output to screen
-                               #endif
-                               
                                mout->mothurOutJustToLog(toString(nextCommand));
                                
-                               #ifdef USE_MPI
-                                       }
-                               #endif
-
                                return nextCommand;
                #endif
-               
-               mout->mothurOutEndLine();
+       
                                                
        }
        catch(exception& e) {
@@ -252,21 +182,10 @@ bool BatchEngine::getInput(){
                        
                        if (input[0] != '#') {
                                
-                               #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) { //only one process should output to screen
-                               #endif
-
                                mout->mothurOutEndLine();
                                mout->mothurOut("mothur > " + input);
                                mout->mothurOutEndLine();
-                               
-                               #ifdef USE_MPI
-                                       }
-                               #endif
-                               
+                                                       
                                if (mout->control_pressed) { input = "quit()"; }
                                
                                //allow user to omit the () on the quit command
@@ -354,21 +273,10 @@ bool ScriptEngine::getInput(){
                        
                        if (input == "") { input = "quit()"; }
                        
-                       #ifdef USE_MPI
-                                       int pid;
-                                       MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
-                                       
-                                       if (pid == 0) {
-                       #endif
-
                        mout->mothurOutEndLine();
                        mout->mothurOut("mothur > " + input);
                        mout->mothurOutEndLine();
                        
-                       #ifdef USE_MPI
-                                       }
-                       #endif
-                       
                        if (mout->control_pressed) { input = "quit()"; }
                                
                        //allow user to omit the () on the quit command