Dont write EOF warnings to stdout every time we checkpoint if the file size==0
authorErik Lindahl <lindahl@cbr.su.se>
Fri, 27 Aug 2010 09:49:29 +0000 (11:49 +0200)
committerErik Lindahl <lindahl@cbr.su.se>
Fri, 27 Aug 2010 09:49:29 +0000 (11:49 +0200)
src/gmxlib/gmxfio.c

index 9de2de941ef36983a3ff2764b3456af5634251df..02fb27c2fbeb36afe5372c33ba8749d662aeabb5 100644 (file)
@@ -717,7 +717,15 @@ static int gmx_fio_int_get_file_md5(t_fileio *fio, gmx_off_t offset,
         }
         else if (feof(fio->fp))
         {
-            fprintf(stderr, "\nTrying to get md5sum: EOF: %s\n", fio->fn);
+            /*
+             * For long runs that checkpoint frequently but write e.g. logs
+             * infrequently we don't want to issue lots of warnings before we
+             * have written anything to the log.
+             */
+            if(0)
+            {
+                fprintf(stderr, "\nTrying to get md5sum: EOF: %s\n", fio->fn);
+            }
         }
         else
         {