]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
added mothurOutJustToScreen function and changed all counter outputs to use it.
[mothur.git] / mothurout.cpp
index 0efa551565c6e18001cd6ed53e0643a50f525f37..fc16d204b142e5a6f55783f56bc52aafb8e6a4d1 100644 (file)
@@ -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