Made construction of parallel filenames less noisy
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 17 Sep 2012 13:45:35 +0000 (23:45 +1000)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 17 Sep 2012 13:45:35 +0000 (23:45 +1000)
Berk introduced this in 6b4a52fc, but it is not essential to the
function there, is not very useful for the user, and spams the stdout
with every possible filename for every simulation in (say) a
multi-simulation.

Change-Id: Ifd017c3907f6a46a4f86ac9bc06c5983a5dea946

src/gmxlib/main.c

index f18487acabaeb3724d915bd48f3e02c58ae16e81..3101457bea1a74213d45a4a70d0ddb3d6f2bef53 100644 (file)
@@ -114,11 +114,13 @@ static void par_fn(char *base,int ftp,const t_commrec *cr,
   
   /* Add extension again */
   strcat(buf,(ftp == efTPX) ? "tpr" : (ftp == efEDR) ? "edr" : ftp2ext(ftp));
-  if (cr->nodeid == 0) {
-    printf("node %d par_fn '%s'\n",cr->nodeid,buf);
-    if (fn2ftp(buf) == efLOG) {
-      printf("log\n");
-    }
+  if (debug)
+  {
+      fprintf(debug, "node %d par_fn '%s'\n",cr->nodeid,buf);
+      if (fn2ftp(buf) == efLOG)
+      {
+          fprintf(debug,"log\n");
+      }
   }
 }