X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=mothurout.cpp;h=2900c7ec4fc8e0df952163554f6fefb7e622cd64;hp=0efa551565c6e18001cd6ed53e0643a50f525f37;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=2cfb747aa8f63bde9c1114001e6d2e81ccd26178 diff --git a/mothurout.cpp b/mothurout.cpp index 0efa551..2900c7e 100644 --- a/mothurout.cpp +++ b/mothurout.cpp @@ -348,6 +348,27 @@ void MothurOut::mothurOut(string output) { } } /*********************************************************************************************/ +void MothurOut::mothurOutJustToScreen(string output) { + try { + +#ifdef USE_MPI + int pid; + MPI_Comm_rank(MPI_COMM_WORLD, &pid); + + if (pid == 0) { //only one process should output to screen +#endif + logger() << output; + +#ifdef USE_MPI + } +#endif + } + catch(exception& e) { + errorOut(e, "MothurOut", "MothurOut"); + exit(1); + } +} +/*********************************************************************************************/ void MothurOut::mothurOutEndLine() { try { #ifdef USE_MPI @@ -2221,9 +2242,11 @@ map MothurOut::readNames(string namefile, unsigned long int& numSeq /************************************************************/ int MothurOut::checkName(string& name) { try { - for (int i = 0; i < name.length(); i++) { - if (name[i] == ':') { name[i] = '_'; changedSeqNames = true; } - } + if (modifyNames) { + for (int i = 0; i < name.length(); i++) { + if (name[i] == ':') { name[i] = '_'; changedSeqNames = true; } + } + } return 0; } catch(exception& e) {