Added GPU local wait to load balancing
[alexxy/gromacs.git] / src / gromacs / timing / wallcycle.c
index 2be9d858606c710f7e649706309ed4fc8aa5f087..ae26c2cec4c0492ba6cdf92071587029d90d4709 100644 (file)
@@ -45,7 +45,7 @@
 #include "gromacs/utility/smalloc.h"
 #include "gmx_fatal.h"
 #include "md_logging.h"
-#include "string2.h"
+#include "gromacs/utility/cstringutil.h"
 
 #include "gromacs/timing/cyclecounter.h"
 #include "gromacs/utility/gmxmpi.h"
@@ -98,8 +98,9 @@ static const char *wcn[ewcNR] =
     "DD comm. bounds", "Vsite constr.", "Send X to PME", "Neighbor search", "Launch GPU ops.",
     "Comm. coord.", "Born radii", "Force", "Wait + Comm. F", "PME mesh",
     "PME redist. X/F", "PME spread/gather", "PME 3D-FFT", "PME 3D-FFT Comm.", "PME solve LJ", "PME solve Elec",
-    "PME wait for PP", "Wait + Recv. PME F", "Wait GPU nonlocal", "Wait GPU local", "NB X/F buffer ops.",
-    "Vsite spread", "Write traj.", "Update", "Constraints", "Comm. energies",
+    "PME wait for PP", "Wait + Recv. PME F", "Wait GPU nonlocal", "Wait GPU local", "Wait GPU loc. est.", "NB X/F buffer ops.",
+    "Vsite spread", "COM pull force",
+    "Write traj.", "Update", "Constraints", "Comm. energies",
     "Enforced rotation", "Add rot. forces", "Coordinate swapping", "IMD", "Test"
 };
 
@@ -386,6 +387,12 @@ void wallcycle_sum(t_commrec *cr, gmx_wallcycle_t wc)
 
     wcc = wc->wcc;
 
+    /* The GPU wait estimate counter is used for load balancing only
+     * and will mess up the total due to double counting: clear it.
+     */
+    wcc[ewcWAIT_GPU_NB_L_EST].n = 0;
+    wcc[ewcWAIT_GPU_NB_L_EST].c = 0;
+
     for (i = 0; i < ewcNR; i++)
     {
         if (is_pme_counter(i) || (i == ewcRUN && cr->duty == DUTY_PME))
@@ -612,7 +619,7 @@ static void print_header(FILE *fplog, int nrank_pp, int nth_pp, int nrank_pme, i
 
     fprintf(fplog, "\n\n");
     fprintf(fplog, " Computing:          Num   Num      Call    Wall time         Giga-Cycles\n");
-    fprintf(fplog, "                     Nodes Threads  Count      (s)         total sum    %%\n");
+    fprintf(fplog, "                     Ranks Threads  Count      (s)         total sum    %%\n");
 }
 
 void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
@@ -719,7 +726,7 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
     if (npme > 0)
     {
         fprintf(fplog,
-                "(*) Note that with separate PME nodes, the walltime column actually sums to\n"
+                "(*) Note that with separate PME ranks, the walltime column actually sums to\n"
                 "    twice the total reported, but the cycle count total and %% are correct.\n"
                 "%s\n", hline);
     }