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
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
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
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