console and log output improvements
authorSzilard Pall <pszilard@cbr.su.se>
Fri, 11 Jan 2013 06:47:19 +0000 (07:47 +0100)
committerSzilard Pall <pszilard@cbr.su.se>
Fri, 11 Jan 2013 06:47:22 +0000 (07:47 +0100)
Improved the console and log output layout and messages.

Change-Id: I0f81cbe9f74ada5a40b2da0c8b2d7dd405bfa7e5

src/gmxlib/gmx_detect_hardware.c
src/gmxlib/gmx_omp_nthreads.c
src/kernel/runner.c
src/mdlib/domdec.c
src/mdlib/gmx_wallcycle.c

index ad3dd9488a4e661d0254acea985ee7a9873b6715..fe4ca975a4df59d120570293e406a9039c1308ba 100644 (file)
@@ -139,7 +139,7 @@ static void print_gpu_use_stats(FILE *fplog,
     }
     else
     {
-        sprintf(sbuf, "%d GPU%s %sselected to be used for this run: ",
+        sprintf(sbuf, "%d GPU%s %sselected for this run: ",
                 ngpu, (ngpu > 1) ? "s" : "",
                 gpu_info->bUserSet ? "user-" : "auto-");
         for (i = 0; i < ngpu; i++)
index 4cbdfca374fe80dd876bc673c1a23ab1fd021e71..f05ce9e895361c79e6936c209e3c77092cb80479 100644 (file)
@@ -382,7 +382,7 @@ void gmx_omp_nthreads_init(FILE *fplog, t_commrec *cr,
 #endif
 
     /* inform the user about the settings */
-    if (SIMMASTER(cr) && bOMP)
+    if (bOMP)
     {
 #ifdef GMX_THREAD_MPI
         const char *mpi_str="per tMPI thread";
@@ -393,15 +393,15 @@ void gmx_omp_nthreads_init(FILE *fplog, t_commrec *cr,
         /* for group scheme we print PME threads info only */
         if (bFullOmpSupport)
         {
-            fprintf(stderr, "Using %d OpenMP thread%s %s\n",
-                    modth.gnth,modth.gnth > 1 ? "s" : "",
-                    cr->nnodes > 1 ? mpi_str : "");
+            md_print_info(cr, fplog, "Using %d OpenMP thread%s %s\n",
+                          modth.gnth,modth.gnth > 1 ? "s" : "",
+                          cr->nnodes > 1 ? mpi_str : "");
         }
         if (bSepPME && modth.gnth_pme != modth.gnth)
         {
-            fprintf(stderr, "Using %d OpenMP thread%s %s for PME\n",
-                    modth.gnth_pme,modth.gnth_pme > 1 ? "s" : "",
-                    cr->nnodes > 1 ? mpi_str : "");
+            md_print_info(cr, fplog, "Using %d OpenMP thread%s %s for PME\n",
+                          modth.gnth_pme,modth.gnth_pme > 1 ? "s" : "",
+                          cr->nnodes > 1 ? mpi_str : "");
         }
     }
 
index be3ed6b310c9a3a60ccdd5bdd9a496c62ef6936d..d323bf65afc3e7f45b4c176497b373f5350793b4 100644 (file)
@@ -263,8 +263,6 @@ static t_commrec *mdrunner_start_threads(gmx_hw_opt_t *hw_opt,
     mda->deviceOptions=deviceOptions;
     mda->Flags=Flags;
 
-    fprintf(stderr, "Starting %d tMPI threads\n",hw_opt->nthreads_tmpi);
-    fflush(stderr);
     /* now spawn new threads that start mdrunner_start_fn(), while 
        the main thread returns */
     ret=tMPI_Init_fn(TRUE, hw_opt->nthreads_tmpi,
@@ -1689,6 +1687,7 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
                   cr->nnodes==1 ? "process" : "processes"
 #endif
                   );
+    fflush(stderr);
 #endif
 
     gmx_omp_nthreads_init(fplog, cr,
index 2f19d21b3b39fbdd665e5720ac333fa245dcffc9..9d6bdc6c38965c59b931e8ea11dd75a9c32e507c 100644 (file)
@@ -5345,7 +5345,7 @@ static void print_dd_load_av(FILE *fplog,gmx_domdec_t *dd)
         if (lossf >= DD_PERF_LOSS)
         {
             sprintf(buf,
-                    "NOTE: %.1f %% performance was lost due to load imbalance\n"
+                    "NOTE: %.1f %% of the available CPU time was lost due to load imbalance\n"
                     "      in the domain decomposition.\n",lossf*100);
             if (!comm->bDynLoadBal)
             {
index 4b3c1ec4ec972009dee8254298a6f6d51948311f..324f17d88472d488dbb01e64f29ba1d3b1f080c3 100644 (file)
@@ -725,7 +725,7 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
         fprintf(fplog, "%s\n", hline);
 
         gpu_cpu_ratio = tot_gpu/tot_cpu_overlap;
-        fprintf(fplog, "\n Force evaluation time GPU/CPU: %.3f ms/%.3f ms = %.3f\n",
+        fprintf(fplog, "\nForce evaluation time GPU/CPU: %.3f ms/%.3f ms = %.3f\n",
                 tot_gpu/gpu_t->nb_c, tot_cpu_overlap/wc->wcc[ewcFORCE].n,
                 gpu_cpu_ratio);
 
@@ -747,9 +747,9 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
                          * but we currently can't check that here.
                          */
                         md_print_warn(NULL,fplog,
-                                      "NOTE: The GPU has >25%% less load than the CPU. This imbalance causes\n"
+                                      "\nNOTE: The GPU has >25%% less load than the CPU. This imbalance causes\n"
                                       "      performance loss. Maybe the domain decomposition limits the PME tuning.\n"
-                                      "      In that case, try setting the DD grid manually (-dd) or lowering -dds.\n");
+                                      "      In that case, try setting the DD grid manually (-dd) or lowering -dds.");
                     }
                     else
                     {
@@ -757,15 +757,15 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
                          * too small for increasing the cut-off for PME tuning.
                          */
                         md_print_warn(NULL,fplog,
-                                      "NOTE: The GPU has >25%% less load than the CPU. This imbalance causes\n"
-                                      "      performance loss.\n");
+                                      "\nNOTE: The GPU has >25%% less load than the CPU. This imbalance causes\n"
+                                      "      performance loss.");
                     }
                 }
                 if (gpu_cpu_ratio > 1.2)
                 {
                     md_print_warn(NULL,fplog,
-                                  "NOTE: The GPU has >20%% more load than the CPU. This imbalance causes\n"
-                                  "      performance loss, consider using a shorter cut-off and a finer PME grid.\n");
+                                  "\nNOTE: The GPU has >20%% more load than the CPU. This imbalance causes\n"
+                                  "      performance loss, consider using a shorter cut-off and a finer PME grid.");
                 }
             }
         }