2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2008, The GROMACS development team.
6 * Copyright (c) 2013,2014, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
37 #include "gromacs/timing/wallcycle.h"
45 #include "gromacs/utility/smalloc.h"
46 #include "gmx_fatal.h"
47 #include "md_logging.h"
48 #include "gromacs/utility/cstringutil.h"
50 #include "gromacs/timing/cyclecounter.h"
51 #include "gromacs/utility/gmxmpi.h"
53 /* DEBUG_WCYCLE adds consistency checking for the counters.
54 * It checks if you stop a counter different from the last
55 * one that was opened and if you do nest too deep.
57 /* #define DEBUG_WCYCLE */
67 typedef struct gmx_wallcycle
70 /* variables for testing/debugging */
76 int counterlist[DEPTH_MAX];
80 gmx_cycles_t cycle_prev;
81 gmx_int64_t reset_counters;
83 MPI_Comm mpi_comm_mygroup;
87 #ifdef GMX_CYCLE_SUBCOUNTERS
93 /* Each name should not exceed 19 printing characters
94 (ie. terminating null can be twentieth) */
95 static const char *wcn[ewcNR] =
97 "Run", "Step", "PP during PME", "Domain decomp.", "DD comm. load",
98 "DD comm. bounds", "Vsite constr.", "Send X to PME", "Neighbor search", "Launch GPU ops.",
99 "Comm. coord.", "Born radii", "Force", "Wait + Comm. F", "PME mesh",
100 "PME redist. X/F", "PME spread/gather", "PME 3D-FFT", "PME 3D-FFT Comm.", "PME solve LJ", "PME solve Elec",
101 "PME wait for PP", "Wait + Recv. PME F", "Wait GPU nonlocal", "Wait GPU local", "Wait GPU loc. est.", "NB X/F buffer ops.",
102 "Vsite spread", "COM pull force",
103 "Write traj.", "Update", "Constraints", "Comm. energies",
104 "Enforced rotation", "Add rot. forces", "Coordinate swapping", "IMD", "Test"
107 static const char *wcsn[ewcsNR] =
109 "DD redist.", "DD NS grid + sort", "DD setup comm.",
110 "DD make top.", "DD make constr.", "DD top. other",
111 "NS grid local", "NS grid non-loc.", "NS search local", "NS search non-loc.",
112 "Bonded F", "Nonbonded F", "Ewald F correction",
113 "NB X buffer ops.", "NB F buffer ops."
116 gmx_bool wallcycle_have_counter(void)
118 return gmx_cycles_have_counter();
121 gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, t_commrec gmx_unused *cr,
122 int nthreads_pp, int nthreads_pme)
127 if (!wallcycle_have_counter())
134 wc->wc_barrier = FALSE;
138 wc->reset_counters = resetstep;
139 wc->nthreads_pp = nthreads_pp;
140 wc->nthreads_pme = nthreads_pme;
141 wc->cycles_sum = NULL;
144 if (PAR(cr) && getenv("GMX_CYCLE_BARRIER") != NULL)
148 fprintf(fplog, "\nWill call MPI_Barrier before each cycle start/stop call\n\n");
150 wc->wc_barrier = TRUE;
151 wc->mpi_comm_mygroup = cr->mpi_comm_mygroup;
155 snew(wc->wcc, ewcNR);
156 if (getenv("GMX_CYCLE_ALL") != NULL)
160 fprintf(fplog, "\nWill time all the code during the run\n\n");
162 snew(wc->wcc_all, ewcNR*ewcNR);
165 #ifdef GMX_CYCLE_SUBCOUNTERS
166 snew(wc->wcsc, ewcsNR);
176 void wallcycle_destroy(gmx_wallcycle_t wc)
187 if (wc->wcc_all != NULL)
191 #ifdef GMX_CYCLE_SUBCOUNTERS
192 if (wc->wcsc != NULL)
200 static void wallcycle_all_start(gmx_wallcycle_t wc, int ewc, gmx_cycles_t cycle)
203 wc->cycle_prev = cycle;
206 static void wallcycle_all_stop(gmx_wallcycle_t wc, int ewc, gmx_cycles_t cycle)
208 wc->wcc_all[wc->ewc_prev*ewcNR+ewc].n += 1;
209 wc->wcc_all[wc->ewc_prev*ewcNR+ewc].c += cycle - wc->cycle_prev;
214 static void debug_start_check(gmx_wallcycle_t wc, int ewc)
216 /* fprintf(stderr,"wcycle_start depth %d, %s\n",wc->count_depth,wcn[ewc]); */
218 if (wc->count_depth < 0 || wc->count_depth >= DEPTH_MAX)
220 gmx_fatal(FARGS, "wallcycle counter depth out of range: %d",
223 wc->counterlist[wc->count_depth] = ewc;
227 static void debug_stop_check(gmx_wallcycle_t wc, int ewc)
231 /* fprintf(stderr,"wcycle_stop depth %d, %s\n",wc->count_depth,wcn[ewc]); */
233 if (wc->count_depth < 0)
235 gmx_fatal(FARGS, "wallcycle counter depth out of range when stopping %s: %d", wcn[ewc], wc->count_depth);
237 if (wc->counterlist[wc->count_depth] != ewc)
239 gmx_fatal(FARGS, "wallcycle mismatch at stop, start %s, stop %s",
240 wcn[wc->counterlist[wc->count_depth]], wcn[ewc]);
245 void wallcycle_start(gmx_wallcycle_t wc, int ewc)
257 MPI_Barrier(wc->mpi_comm_mygroup);
262 debug_start_check(wc, ewc);
265 cycle = gmx_cycles_read();
266 wc->wcc[ewc].start = cycle;
267 if (wc->wcc_all != NULL)
272 wallcycle_all_start(wc, ewc, cycle);
274 else if (wc->wc_depth == 3)
276 wallcycle_all_stop(wc, ewc, cycle);
281 void wallcycle_start_nocount(gmx_wallcycle_t wc, int ewc)
288 wallcycle_start(wc, ewc);
292 double wallcycle_stop(gmx_wallcycle_t wc, int ewc)
294 gmx_cycles_t cycle, last;
304 MPI_Barrier(wc->mpi_comm_mygroup);
309 debug_stop_check(wc, ewc);
312 cycle = gmx_cycles_read();
313 last = cycle - wc->wcc[ewc].start;
314 wc->wcc[ewc].c += last;
321 wallcycle_all_stop(wc, ewc, cycle);
323 else if (wc->wc_depth == 2)
325 wallcycle_all_start(wc, ewc, cycle);
332 void wallcycle_reset_all(gmx_wallcycle_t wc)
341 for (i = 0; i < ewcNR; i++)
348 for (i = 0; i < ewcNR*ewcNR; i++)
350 wc->wcc_all[i].n = 0;
351 wc->wcc_all[i].c = 0;
354 #ifdef GMX_CYCLE_SUBCOUNTERS
355 for (i = 0; i < ewcsNR; i++)
363 static gmx_bool is_pme_counter(int ewc)
365 return (ewc >= ewcPMEMESH && ewc <= ewcPMEWAITCOMM);
368 static gmx_bool is_pme_subcounter(int ewc)
370 return (ewc >= ewcPME_REDISTXF && ewc < ewcPMEWAITCOMM);
373 void wallcycle_sum(t_commrec *cr, gmx_wallcycle_t wc)
376 double cycles[ewcNR+ewcsNR];
377 double cycles_n[ewcNR+ewcsNR], buf[ewcNR+ewcsNR], *cyc_all, *buf_all;
386 snew(wc->cycles_sum, ewcNR+ewcsNR);
390 /* The GPU wait estimate counter is used for load balancing only
391 * and will mess up the total due to double counting: clear it.
393 wcc[ewcWAIT_GPU_NB_L_EST].n = 0;
394 wcc[ewcWAIT_GPU_NB_L_EST].c = 0;
396 for (i = 0; i < ewcNR; i++)
398 if (is_pme_counter(i) || (i == ewcRUN && cr->duty == DUTY_PME))
400 wcc[i].c *= wc->nthreads_pme;
404 for (j = 0; j < ewcNR; j++)
406 wc->wcc_all[i*ewcNR+j].c *= wc->nthreads_pme;
412 wcc[i].c *= wc->nthreads_pp;
416 for (j = 0; j < ewcNR; j++)
418 wc->wcc_all[i*ewcNR+j].c *= wc->nthreads_pp;
424 if (wcc[ewcDDCOMMLOAD].n > 0)
426 wcc[ewcDOMDEC].c -= wcc[ewcDDCOMMLOAD].c;
428 if (wcc[ewcDDCOMMBOUND].n > 0)
430 wcc[ewcDOMDEC].c -= wcc[ewcDDCOMMBOUND].c;
432 if (wcc[ewcPME_FFTCOMM].n > 0)
434 wcc[ewcPME_FFT].c -= wcc[ewcPME_FFTCOMM].c;
437 if (cr->npmenodes == 0)
439 /* All nodes do PME (or no PME at all) */
440 if (wcc[ewcPMEMESH].n > 0)
442 wcc[ewcFORCE].c -= wcc[ewcPMEMESH].c;
447 /* The are PME-only nodes */
448 if (wcc[ewcPMEMESH].n > 0)
450 /* This must be a PME only node, calculate the Wait + Comm. time */
451 wcc[ewcPMEWAITCOMM].c = wcc[ewcRUN].c - wcc[ewcPMEMESH].c;
455 /* Store the cycles in a double buffer for summing */
456 for (i = 0; i < ewcNR; i++)
458 cycles_n[i] = (double)wcc[i].n;
459 cycles[i] = (double)wcc[i].c;
462 #ifdef GMX_CYCLE_SUBCOUNTERS
463 for (i = 0; i < ewcsNR; i++)
465 wc->wcsc[i].c *= wc->nthreads_pp;
466 cycles_n[ewcNR+i] = (double)wc->wcsc[i].n;
467 cycles[ewcNR+i] = (double)wc->wcsc[i].c;
475 MPI_Allreduce(cycles_n, buf, nsum, MPI_DOUBLE, MPI_MAX,
477 for (i = 0; i < ewcNR; i++)
479 wcc[i].n = (int)(buf[i] + 0.5);
481 #ifdef GMX_CYCLE_SUBCOUNTERS
482 for (i = 0; i < ewcsNR; i++)
484 wc->wcsc[i].n = (int)(buf[ewcNR+i] + 0.5);
488 MPI_Allreduce(cycles, wc->cycles_sum, nsum, MPI_DOUBLE, MPI_SUM,
491 if (wc->wcc_all != NULL)
493 snew(cyc_all, ewcNR*ewcNR);
494 snew(buf_all, ewcNR*ewcNR);
495 for (i = 0; i < ewcNR*ewcNR; i++)
497 cyc_all[i] = wc->wcc_all[i].c;
499 MPI_Allreduce(cyc_all, buf_all, ewcNR*ewcNR, MPI_DOUBLE, MPI_SUM,
501 for (i = 0; i < ewcNR*ewcNR; i++)
503 wc->wcc_all[i].c = buf_all[i];
512 for (i = 0; i < nsum; i++)
514 wc->cycles_sum[i] = cycles[i];
519 static void print_cycles(FILE *fplog, double c2t, const char *name,
520 int nnodes, int nthreads,
521 int ncalls, double c_sum, double tot)
524 char nthreads_str[6];
532 snprintf(ncalls_str, sizeof(ncalls_str), "%10d", ncalls);
535 snprintf(nnodes_str, sizeof(nnodes_str), "N/A");
539 snprintf(nnodes_str, sizeof(nnodes_str), "%4d", nnodes);
543 snprintf(nthreads_str, sizeof(nthreads_str), "N/A");
547 snprintf(nthreads_str, sizeof(nthreads_str), "%4d", nthreads);
556 /* Convert the cycle count to wallclock time for this task */
559 fprintf(fplog, " %-19.19s %4s %4s %10s %10.3f %14.3f %5.1f\n",
560 name, nnodes_str, nthreads_str, ncalls_str, wallt,
561 c_sum*1e-9, 100*c_sum/tot);
565 static void print_gputimes(FILE *fplog, const char *name,
566 int n, double t, double tot_t)
573 snprintf(num, sizeof(num), "%10d", n);
574 snprintf(avg_perf, sizeof(avg_perf), "%10.3f", t/n);
579 sprintf(avg_perf, " ");
583 fprintf(fplog, " %-29s %10s%12.3f %s %5.1f\n",
584 name, num, t/1000, avg_perf, 100 * t/tot_t);
588 fprintf(fplog, " %-29s %10s%12.3f %s %5.1f\n",
589 name, "", t/1000, avg_perf, 100.0);
593 static void print_header(FILE *fplog, int nrank_pp, int nth_pp, int nrank_pme, int nth_pme)
595 int nrank_tot = nrank_pp + nrank_pme;
598 fprintf(fplog, "On %d MPI rank%s", nrank_tot, nrank_tot == 1 ? "" : "s");
601 fprintf(fplog, ", each using %d OpenMP threads", nth_pp);
603 /* Don't report doing PP+PME, because we can't tell here if
604 * this is RF, etc. */
608 fprintf(fplog, "On %d MPI rank%s doing PP", nrank_pp, nrank_pp == 1 ? "" : "s");
611 fprintf(fplog, ",%s using %d OpenMP threads", nrank_pp > 1 ? " each" : "", nth_pp);
613 fprintf(fplog, ", and\non %d MPI rank%s doing PME", nrank_pme, nrank_pme == 1 ? "" : "s");
616 fprintf(fplog, ",%s using %d OpenMP threads", nrank_pme > 1 ? " each" : "", nth_pme);
620 fprintf(fplog, "\n\n");
621 fprintf(fplog, " Computing: Num Num Call Wall time Giga-Cycles\n");
622 fprintf(fplog, " Ranks Threads Count (s) total sum %%\n");
625 void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
626 gmx_wallcycle_t wc, wallclock_gpu_t *gpu_t)
629 double tot, tot_for_pp, tot_for_rest, tot_gpu, tot_cpu_overlap, gpu_cpu_ratio, tot_k;
630 double c2t, c2t_pp, c2t_pme;
631 int i, j, npp, nth_pp, nth_pme, nth_tot;
633 const char *hline = "-----------------------------------------------------------------------------";
640 nth_pp = wc->nthreads_pp;
641 nth_pme = wc->nthreads_pme;
643 cyc_sum = wc->cycles_sum;
646 nth_tot = npp*nth_pp + npme*nth_pme;
648 /* When using PME-only nodes, the next line is valid for both
649 PP-only and PME-only nodes because they started ewcRUN at the
651 tot = cyc_sum[ewcRUN];
654 /* Conversion factor from cycles to seconds */
658 c2t_pp = c2t * nth_tot / (double) (npp*nth_pp);
659 c2t_pme = c2t * nth_tot / (double) (npme*nth_pme);
668 fprintf(fplog, "\n R E A L C Y C L E A N D T I M E A C C O U N T I N G\n\n");
670 print_header(fplog, npp, nth_pp, npme, nth_pme);
672 fprintf(fplog, "%s\n", hline);
673 for (i = ewcPPDURINGPME+1; i < ewcNR; i++)
675 if (is_pme_subcounter(i))
677 /* Do not count these at all */
679 else if (npme > 0 && is_pme_counter(i))
681 /* Print timing information for PME-only nodes, but add an
682 * asterisk so the reader of the table can know that the
683 * walltimes are not meant to add up. The asterisk still
684 * fits in the required maximum of 19 characters. */
686 snprintf(buffer, STRLEN, "%s *", wcn[i]);
687 print_cycles(fplog, c2t_pme, buffer,
689 wc->wcc[i].n, cyc_sum[i], tot);
693 /* Print timing information when it is for a PP or PP+PME
695 print_cycles(fplog, c2t_pp, wcn[i],
697 wc->wcc[i].n, cyc_sum[i], tot);
698 tot_for_pp += cyc_sum[i];
701 if (wc->wcc_all != NULL)
703 for (i = 0; i < ewcNR; i++)
705 for (j = 0; j < ewcNR; j++)
707 snprintf(buf, 20, "%-9.9s %-9.9s", wcn[i], wcn[j]);
708 print_cycles(fplog, c2t_pp, buf,
710 wc->wcc_all[i*ewcNR+j].n,
711 wc->wcc_all[i*ewcNR+j].c,
716 tot_for_rest = tot * (npp * nth_pp) / (double) nth_tot;
717 print_cycles(fplog, c2t_pp, "Rest",
719 -1, tot_for_rest - tot_for_pp, tot);
720 fprintf(fplog, "%s\n", hline);
721 print_cycles(fplog, c2t, "Total",
724 fprintf(fplog, "%s\n", hline);
729 "(*) Note that with separate PME ranks, the walltime column actually sums to\n"
730 " twice the total reported, but the cycle count total and %% are correct.\n"
734 if (wc->wcc[ewcPMEMESH].n > 0)
736 fprintf(fplog, " Breakdown of PME mesh computation\n");
737 fprintf(fplog, "%s\n", hline);
738 for (i = ewcPPDURINGPME+1; i < ewcNR; i++)
740 if (is_pme_subcounter(i))
742 print_cycles(fplog, npme > 0 ? c2t_pme : c2t_pp, wcn[i],
743 npme > 0 ? npme : npp, nth_pme,
744 wc->wcc[i].n, cyc_sum[i], tot);
747 fprintf(fplog, "%s\n", hline);
750 #ifdef GMX_CYCLE_SUBCOUNTERS
751 fprintf(fplog, " Breakdown of PP computation\n");
752 fprintf(fplog, "%s\n", hline);
753 for (i = 0; i < ewcsNR; i++)
755 print_cycles(fplog, c2t_pp, wcsn[i],
757 wc->wcsc[i].n, cyc_sum[ewcNR+i], tot);
759 fprintf(fplog, "%s\n", hline);
762 /* print GPU timing summary */
765 const char *k_log_str[2][2] = {
766 {"Nonbonded F kernel", "Nonbonded F+ene k."},
767 {"Nonbonded F+prune k.", "Nonbonded F+ene+prune k."}
770 tot_gpu = gpu_t->pl_h2d_t + gpu_t->nb_h2d_t + gpu_t->nb_d2h_t;
772 /* add up the kernel timings */
774 for (i = 0; i < 2; i++)
776 for (j = 0; j < 2; j++)
778 tot_k += gpu_t->ktime[i][j].t;
783 tot_cpu_overlap = wc->wcc[ewcFORCE].c;
784 if (wc->wcc[ewcPMEMESH].n > 0)
786 tot_cpu_overlap += wc->wcc[ewcPMEMESH].c;
788 tot_cpu_overlap *= realtime*1000/tot; /* convert s to ms */
790 fprintf(fplog, "\n GPU timings\n%s\n", hline);
791 fprintf(fplog, " Computing: Count Wall t (s) ms/step %c\n", '%');
792 fprintf(fplog, "%s\n", hline);
793 print_gputimes(fplog, "Pair list H2D",
794 gpu_t->pl_h2d_c, gpu_t->pl_h2d_t, tot_gpu);
795 print_gputimes(fplog, "X / q H2D",
796 gpu_t->nb_c, gpu_t->nb_h2d_t, tot_gpu);
798 for (i = 0; i < 2; i++)
800 for (j = 0; j < 2; j++)
802 if (gpu_t->ktime[i][j].c)
804 print_gputimes(fplog, k_log_str[i][j],
805 gpu_t->ktime[i][j].c, gpu_t->ktime[i][j].t, tot_gpu);
810 print_gputimes(fplog, "F D2H", gpu_t->nb_c, gpu_t->nb_d2h_t, tot_gpu);
811 fprintf(fplog, "%s\n", hline);
812 print_gputimes(fplog, "Total ", gpu_t->nb_c, tot_gpu, tot_gpu);
813 fprintf(fplog, "%s\n", hline);
815 gpu_cpu_ratio = tot_gpu/tot_cpu_overlap;
816 fprintf(fplog, "\nForce evaluation time GPU/CPU: %.3f ms/%.3f ms = %.3f\n",
817 tot_gpu/gpu_t->nb_c, tot_cpu_overlap/wc->wcc[ewcFORCE].n,
820 /* only print notes related to CPU-GPU load balance with PME */
821 if (wc->wcc[ewcPMEMESH].n > 0)
823 fprintf(fplog, "For optimal performance this ratio should be close to 1!\n");
825 /* print note if the imbalance is high with PME case in which
826 * CPU-GPU load balancing is possible */
827 if (gpu_cpu_ratio < 0.75 || gpu_cpu_ratio > 1.2)
829 /* Only the sim master calls this function, so always print to stderr */
830 if (gpu_cpu_ratio < 0.75)
834 /* The user could have used -notunepme,
835 * but we currently can't check that here.
837 md_print_warn(NULL, fplog,
838 "\nNOTE: The GPU has >25%% less load than the CPU. This imbalance causes\n"
839 " performance loss. Maybe the domain decomposition limits the PME tuning.\n"
840 " In that case, try setting the DD grid manually (-dd) or lowering -dds.");
844 /* We should not end up here, unless the box is
845 * too small for increasing the cut-off for PME tuning.
847 md_print_warn(NULL, fplog,
848 "\nNOTE: The GPU has >25%% less load than the CPU. This imbalance causes\n"
849 " performance loss.");
852 if (gpu_cpu_ratio > 1.2)
854 md_print_warn(NULL, fplog,
855 "\nNOTE: The GPU has >20%% more load than the CPU. This imbalance causes\n"
856 " performance loss, consider using a shorter cut-off and a finer PME grid.");
862 if (wc->wcc[ewcNB_XF_BUF_OPS].n > 0 &&
863 (cyc_sum[ewcDOMDEC] > tot*0.1 ||
864 cyc_sum[ewcNS] > tot*0.1))
866 /* Only the sim master calls this function, so always print to stderr */
867 if (wc->wcc[ewcDOMDEC].n == 0)
869 md_print_warn(NULL, fplog,
870 "NOTE: %d %% of the run time was spent in pair search,\n"
871 " you might want to increase nstlist (this has no effect on accuracy)\n",
872 (int)(100*cyc_sum[ewcNS]/tot+0.5));
876 md_print_warn(NULL, fplog,
877 "NOTE: %d %% of the run time was spent in domain decomposition,\n"
878 " %d %% of the run time was spent in pair search,\n"
879 " you might want to increase nstlist (this has no effect on accuracy)\n",
880 (int)(100*cyc_sum[ewcDOMDEC]/tot+0.5),
881 (int)(100*cyc_sum[ewcNS]/tot+0.5));
885 if (cyc_sum[ewcMoveE] > tot*0.05)
887 /* Only the sim master calls this function, so always print to stderr */
888 md_print_warn(NULL, fplog,
889 "NOTE: %d %% of the run time was spent communicating energies,\n"
890 " you might want to use the -gcom option of mdrun\n",
891 (int)(100*cyc_sum[ewcMoveE]/tot+0.5));
895 extern gmx_int64_t wcycle_get_reset_counters(gmx_wallcycle_t wc)
902 return wc->reset_counters;
905 extern void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_int64_t reset_counters)
912 wc->reset_counters = reset_counters;
915 #ifdef GMX_CYCLE_SUBCOUNTERS
917 void wallcycle_sub_start(gmx_wallcycle_t wc, int ewcs)
921 wc->wcsc[ewcs].start = gmx_cycles_read();
925 void wallcycle_sub_stop(gmx_wallcycle_t wc, int ewcs)
929 wc->wcsc[ewcs].c += gmx_cycles_read() - wc->wcsc[ewcs].start;
936 void wallcycle_sub_start(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs)
939 void wallcycle_sub_stop(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs)
943 #endif /* GMX_CYCLE_SUBCOUNTERS */