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-2011, The GROMACS development team,
6 * check out http://www.gromacs.org for more information.
7 * Copyright (c) 2012,2013, by the GROMACS development team, led by
8 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9 * others, as listed in the AUTHORS file in the top-level source
10 * directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
48 #include "nbnxn_cuda_data_mgmt.h"
50 #include "md_logging.h"
51 #include "pme_loadbal.h"
53 /* Parameters and setting for one PP-PME setup */
55 real rcut_coulomb; /* Coulomb cut-off */
56 real rlist; /* pair-list cut-off */
57 real rlistlong; /* LR pair-list cut-off */
58 int nstcalclr; /* frequency of evaluating long-range forces for group scheme */
59 real spacing; /* (largest) PME grid spacing */
60 ivec grid; /* the PME grid dimensions */
61 real grid_efficiency; /* ineffiency factor for non-uniform grids <= 1 */
62 real ewaldcoeff; /* the Ewald coefficient */
63 gmx_pme_t pmedata; /* the data structure used in the PME code */
65 int count; /* number of times this setup has been timed */
66 double cycles; /* the fastest time for this setup in cycles */
69 /* In the initial scan, step by grids that are at least a factor 0.8 coarser */
70 #define PME_LB_GRID_SCALE_FAC 0.8
71 /* In the initial scan, try to skip grids with uneven x/y/z spacing,
72 * checking if the "efficiency" is more than 5% worse than the previous grid.
74 #define PME_LB_GRID_EFFICIENCY_REL_FAC 1.05
75 /* Rerun up till 12% slower setups than the fastest up till now */
76 #define PME_LB_SLOW_FAC 1.12
77 /* If setups get more than 2% faster, do another round to avoid
78 * choosing a slower setup due to acceleration or fluctuations.
80 #define PME_LB_ACCEL_TOL 1.02
83 epmelblimNO, epmelblimBOX, epmelblimDD, epmelblimPMEGRID, epmelblimNR
86 const char *pmelblim_str[epmelblimNR] =
87 { "no", "box size", "domain decompostion", "PME grid restriction" };
89 struct pme_load_balancing {
90 int nstage; /* the current maximum number of stages */
92 real cut_spacing; /* the minimum cutoff / PME grid spacing ratio */
93 real rcut_vdw; /* Vdw cutoff (does not change) */
94 real rcut_coulomb_start; /* Initial electrostatics cutoff */
95 int nstcalclr_start; /* Initial electrostatics cutoff */
96 real rbuf_coulomb; /* the pairlist buffer size */
97 real rbuf_vdw; /* the pairlist buffer size */
98 matrix box_start; /* the initial simulation box */
99 int n; /* the count of setup as well as the allocation size */
100 pme_setup_t *setup; /* the PME+cutoff setups */
101 int cur; /* the current setup */
102 int fastest; /* fastest setup up till now */
103 int start; /* start of setup range to consider in stage>0 */
104 int end; /* end of setup range to consider in stage>0 */
105 int elimited; /* was the balancing limited, uses enum above */
106 int cutoff_scheme; /* Verlet or group cut-offs */
108 int stage; /* the current stage */
111 void pme_loadbal_init(pme_load_balancing_t *pme_lb_p,
112 const t_inputrec *ir, matrix box,
113 const interaction_const_t *ic,
116 pme_load_balancing_t pme_lb;
122 /* Any number of stages >= 2 is supported */
125 pme_lb->cutoff_scheme = ir->cutoff_scheme;
127 if (pme_lb->cutoff_scheme == ecutsVERLET)
129 pme_lb->rbuf_coulomb = ic->rlist - ic->rcoulomb;
130 pme_lb->rbuf_vdw = pme_lb->rbuf_coulomb;
134 if (ic->rcoulomb > ic->rlist)
136 pme_lb->rbuf_coulomb = ic->rlistlong - ic->rcoulomb;
140 pme_lb->rbuf_coulomb = ic->rlist - ic->rcoulomb;
142 if (ic->rvdw > ic->rlist)
144 pme_lb->rbuf_vdw = ic->rlistlong - ic->rvdw;
148 pme_lb->rbuf_vdw = ic->rlist - ic->rvdw;
152 copy_mat(box, pme_lb->box_start);
153 if (ir->ePBC == epbcXY && ir->nwall == 2)
155 svmul(ir->wall_ewald_zfac, pme_lb->box_start[ZZ], pme_lb->box_start[ZZ]);
159 snew(pme_lb->setup, pme_lb->n);
161 pme_lb->rcut_vdw = ic->rvdw;
162 pme_lb->rcut_coulomb_start = ir->rcoulomb;
163 pme_lb->nstcalclr_start = ir->nstcalclr;
166 pme_lb->setup[0].rcut_coulomb = ic->rcoulomb;
167 pme_lb->setup[0].rlist = ic->rlist;
168 pme_lb->setup[0].rlistlong = ic->rlistlong;
169 pme_lb->setup[0].nstcalclr = ir->nstcalclr;
170 pme_lb->setup[0].grid[XX] = ir->nkx;
171 pme_lb->setup[0].grid[YY] = ir->nky;
172 pme_lb->setup[0].grid[ZZ] = ir->nkz;
173 pme_lb->setup[0].ewaldcoeff = ic->ewaldcoeff;
175 pme_lb->setup[0].pmedata = pmedata;
178 for (d = 0; d < DIM; d++)
180 sp = norm(pme_lb->box_start[d])/pme_lb->setup[0].grid[d];
186 pme_lb->setup[0].spacing = spm;
188 if (ir->fourier_spacing > 0)
190 pme_lb->cut_spacing = ir->rcoulomb/ir->fourier_spacing;
194 pme_lb->cut_spacing = ir->rcoulomb/pme_lb->setup[0].spacing;
202 pme_lb->elimited = epmelblimNO;
207 static gmx_bool pme_loadbal_increase_cutoff(pme_load_balancing_t pme_lb,
209 const gmx_domdec_t *dd)
212 int npmenodes_x, npmenodes_y;
214 real tmpr_coulomb, tmpr_vdw;
218 /* Try to add a new setup with next larger cut-off to the list */
220 srenew(pme_lb->setup, pme_lb->n);
221 set = &pme_lb->setup[pme_lb->n-1];
224 get_pme_nnodes(dd, &npmenodes_x, &npmenodes_y);
229 /* Avoid infinite while loop, which can occur at the minimum grid size.
230 * Note that in practice load balancing will stop before this point.
231 * The factor 2.1 allows for the extreme case in which only grids
232 * of powers of 2 are allowed (the current code supports more grids).
242 clear_ivec(set->grid);
243 sp = calc_grid(NULL, pme_lb->box_start,
244 fac*pme_lb->setup[pme_lb->cur].spacing,
249 /* As here we can't easily check if one of the PME nodes
250 * uses threading, we do a conservative grid check.
251 * This means we can't use pme_order or less grid lines
252 * per PME node along x, which is not a strong restriction.
254 gmx_pme_check_restrictions(pme_order,
255 set->grid[XX], set->grid[YY], set->grid[ZZ],
256 npmenodes_x, npmenodes_y,
261 while (sp <= 1.001*pme_lb->setup[pme_lb->cur].spacing || !grid_ok);
263 set->rcut_coulomb = pme_lb->cut_spacing*sp;
265 if (pme_lb->cutoff_scheme == ecutsVERLET)
267 set->rlist = set->rcut_coulomb + pme_lb->rbuf_coulomb;
268 /* We dont use LR lists with Verlet, but this avoids if-statements in further checks */
269 set->rlistlong = set->rlist;
273 tmpr_coulomb = set->rcut_coulomb + pme_lb->rbuf_coulomb;
274 tmpr_vdw = pme_lb->rcut_vdw + pme_lb->rbuf_vdw;
275 set->rlist = min(tmpr_coulomb, tmpr_vdw);
276 set->rlistlong = max(tmpr_coulomb, tmpr_vdw);
278 /* Set the long-range update frequency */
279 if (set->rlist == set->rlistlong)
281 /* No long-range interactions if the short-/long-range cutoffs are identical */
284 else if (pme_lb->nstcalclr_start == 0 || pme_lb->nstcalclr_start == 1)
286 /* We were not doing long-range before, but now we are since rlist!=rlistlong */
291 /* We were already doing long-range interactions from the start */
292 if (pme_lb->rcut_vdw > pme_lb->rcut_coulomb_start)
294 /* We were originally doing long-range VdW-only interactions.
295 * If rvdw is still longer than rcoulomb we keep the original nstcalclr,
296 * but if the coulomb cutoff has become longer we should update the long-range
299 set->nstcalclr = (tmpr_vdw > tmpr_coulomb) ? pme_lb->nstcalclr_start : 1;
303 /* We were not doing any long-range interaction from the start,
304 * since it is not possible to do twin-range coulomb for the PME interaction.
312 /* The grid efficiency is the size wrt a grid with uniform x/y/z spacing */
313 set->grid_efficiency = 1;
314 for (d = 0; d < DIM; d++)
316 set->grid_efficiency *= (set->grid[d]*sp)/norm(pme_lb->box_start[d]);
318 /* The Ewald coefficient is inversly proportional to the cut-off */
320 pme_lb->setup[0].ewaldcoeff*pme_lb->setup[0].rcut_coulomb/set->rcut_coulomb;
327 fprintf(debug, "PME loadbal: grid %d %d %d, coulomb cutoff %f\n",
328 set->grid[XX], set->grid[YY], set->grid[ZZ], set->rcut_coulomb);
333 static void print_grid(FILE *fp_err, FILE *fp_log,
336 const pme_setup_t *set,
339 char buf[STRLEN], buft[STRLEN];
343 sprintf(buft, ": %.1f M-cycles", cycles*1e-6);
349 sprintf(buf, "%-11s%10s pme grid %d %d %d, coulomb cutoff %.3f%s",
351 desc, set->grid[XX], set->grid[YY], set->grid[ZZ], set->rcut_coulomb,
355 fprintf(fp_err, "\r%s\n", buf);
359 fprintf(fp_log, "%s\n", buf);
363 static int pme_loadbal_end(pme_load_balancing_t pme_lb)
365 /* In the initial stage only n is set; end is not set yet */
376 static void print_loadbal_limited(FILE *fp_err, FILE *fp_log,
377 gmx_large_int_t step,
378 pme_load_balancing_t pme_lb)
380 char buf[STRLEN], sbuf[22];
382 sprintf(buf, "step %4s: the %s limits the PME load balancing to a coulomb cut-off of %.3f",
383 gmx_step_str(step, sbuf),
384 pmelblim_str[pme_lb->elimited],
385 pme_lb->setup[pme_loadbal_end(pme_lb)-1].rcut_coulomb);
388 fprintf(fp_err, "\r%s\n", buf);
392 fprintf(fp_log, "%s\n", buf);
396 static void switch_to_stage1(pme_load_balancing_t pme_lb)
399 while (pme_lb->start+1 < pme_lb->n &&
400 (pme_lb->setup[pme_lb->start].count == 0 ||
401 pme_lb->setup[pme_lb->start].cycles >
402 pme_lb->setup[pme_lb->fastest].cycles*PME_LB_SLOW_FAC))
406 while (pme_lb->start > 0 && pme_lb->setup[pme_lb->start-1].cycles == 0)
411 pme_lb->end = pme_lb->n;
412 if (pme_lb->setup[pme_lb->end-1].count > 0 &&
413 pme_lb->setup[pme_lb->end-1].cycles >
414 pme_lb->setup[pme_lb->fastest].cycles*PME_LB_SLOW_FAC)
421 /* Next we want to choose setup pme_lb->start, but as we will increase
422 * pme_ln->cur by one right after returning, we subtract 1 here.
424 pme_lb->cur = pme_lb->start - 1;
427 gmx_bool pme_load_balance(pme_load_balancing_t pme_lb,
434 interaction_const_t *ic,
435 nonbonded_verlet_t *nbv,
437 gmx_large_int_t step)
442 char buf[STRLEN], sbuf[22];
444 gmx_bool bUsesSimpleTables = TRUE;
446 if (pme_lb->stage == pme_lb->nstage)
453 gmx_sumd(1, &cycles, cr);
454 cycles /= cr->nnodes;
457 set = &pme_lb->setup[pme_lb->cur];
460 rtab = ir->rlistlong + ir->tabext;
462 if (set->count % 2 == 1)
464 /* Skip the first cycle, because the first step after a switch
465 * is much slower due to allocation and/or caching effects.
470 sprintf(buf, "step %4s: ", gmx_step_str(step, sbuf));
471 print_grid(fp_err, fp_log, buf, "timed with", set, cycles);
475 set->cycles = cycles;
479 if (cycles*PME_LB_ACCEL_TOL < set->cycles &&
480 pme_lb->stage == pme_lb->nstage - 1)
482 /* The performance went up a lot (due to e.g. DD load balancing).
483 * Add a stage, keep the minima, but rescan all setups.
489 fprintf(debug, "The performance for grid %d %d %d went from %.3f to %.1f M-cycles, this is more than %f\n"
490 "Increased the number stages to %d"
491 " and ignoring the previous performance\n",
492 set->grid[XX], set->grid[YY], set->grid[ZZ],
493 cycles*1e-6, set->cycles*1e-6, PME_LB_ACCEL_TOL,
497 set->cycles = min(set->cycles, cycles);
500 if (set->cycles < pme_lb->setup[pme_lb->fastest].cycles)
502 pme_lb->fastest = pme_lb->cur;
504 if (DOMAINDECOMP(cr))
506 /* We found a new fastest setting, ensure that with subsequent
507 * shorter cut-off's the dynamic load balancing does not make
508 * the use of the current cut-off impossible. This solution is
509 * a trade-off, as the PME load balancing and DD domain size
510 * load balancing can interact in complex ways.
511 * With the Verlet kernels, DD load imbalance will usually be
512 * mainly due to bonded interaction imbalance, which will often
513 * quickly push the domain boundaries beyond the limit for the
514 * optimal, PME load balanced, cut-off. But it could be that
515 * better overal performance can be obtained with a slightly
516 * shorter cut-off and better DD load balancing.
518 change_dd_dlb_cutoff_limit(cr);
521 cycles_fast = pme_lb->setup[pme_lb->fastest].cycles;
523 /* Check in stage 0 if we should stop scanning grids.
524 * Stop when the time is more than SLOW_FAC longer than the fastest.
526 if (pme_lb->stage == 0 && pme_lb->cur > 0 &&
527 cycles > pme_lb->setup[pme_lb->fastest].cycles*PME_LB_SLOW_FAC)
529 pme_lb->n = pme_lb->cur + 1;
530 /* Done with scanning, go to stage 1 */
531 switch_to_stage1(pme_lb);
534 if (pme_lb->stage == 0)
538 gridsize_start = set->grid[XX]*set->grid[YY]*set->grid[ZZ];
542 if (pme_lb->cur+1 < pme_lb->n)
544 /* We had already generated the next setup */
549 /* Find the next setup */
550 OK = pme_loadbal_increase_cutoff(pme_lb, ir->pme_order, cr->dd);
554 pme_lb->elimited = epmelblimPMEGRID;
558 if (OK && ir->ePBC != epbcNONE)
560 OK = (sqr(pme_lb->setup[pme_lb->cur+1].rlistlong)
561 <= max_cutoff2(ir->ePBC, state->box));
564 pme_lb->elimited = epmelblimBOX;
572 if (DOMAINDECOMP(cr))
574 OK = change_dd_cutoff(cr, state, ir,
575 pme_lb->setup[pme_lb->cur].rlistlong);
578 /* Failed: do not use this setup */
580 pme_lb->elimited = epmelblimDD;
586 /* We hit the upper limit for the cut-off,
587 * the setup should not go further than cur.
589 pme_lb->n = pme_lb->cur + 1;
590 print_loadbal_limited(fp_err, fp_log, step, pme_lb);
591 /* Switch to the next stage */
592 switch_to_stage1(pme_lb);
596 !(pme_lb->setup[pme_lb->cur].grid[XX]*
597 pme_lb->setup[pme_lb->cur].grid[YY]*
598 pme_lb->setup[pme_lb->cur].grid[ZZ] <
599 gridsize_start*PME_LB_GRID_SCALE_FAC
601 pme_lb->setup[pme_lb->cur].grid_efficiency <
602 pme_lb->setup[pme_lb->cur-1].grid_efficiency*PME_LB_GRID_EFFICIENCY_REL_FAC));
605 if (pme_lb->stage > 0 && pme_lb->end == 1)
608 pme_lb->stage = pme_lb->nstage;
610 else if (pme_lb->stage > 0 && pme_lb->end > 1)
612 /* If stage = nstage-1:
613 * scan over all setups, rerunning only those setups
614 * which are not much slower than the fastest
621 if (pme_lb->cur == pme_lb->end)
624 pme_lb->cur = pme_lb->start;
627 while (pme_lb->stage == pme_lb->nstage - 1 &&
628 pme_lb->setup[pme_lb->cur].count > 0 &&
629 pme_lb->setup[pme_lb->cur].cycles > cycles_fast*PME_LB_SLOW_FAC);
631 if (pme_lb->stage == pme_lb->nstage)
633 /* We are done optimizing, use the fastest setup we found */
634 pme_lb->cur = pme_lb->fastest;
638 if (DOMAINDECOMP(cr) && pme_lb->stage > 0)
640 OK = change_dd_cutoff(cr, state, ir, pme_lb->setup[pme_lb->cur].rlistlong);
643 /* Failsafe solution */
644 if (pme_lb->cur > 1 && pme_lb->stage == pme_lb->nstage)
650 pme_lb->end = pme_lb->cur;
651 pme_lb->cur = pme_lb->start;
652 pme_lb->elimited = epmelblimDD;
653 print_loadbal_limited(fp_err, fp_log, step, pme_lb);
657 /* Change the Coulomb cut-off and the PME grid */
659 set = &pme_lb->setup[pme_lb->cur];
661 ic->rcoulomb = set->rcut_coulomb;
662 ic->rlist = set->rlist;
663 ic->rlistlong = set->rlistlong;
664 ir->nstcalclr = set->nstcalclr;
665 ic->ewaldcoeff = set->ewaldcoeff;
667 bUsesSimpleTables = uses_simple_tables(ir->cutoff_scheme, nbv, 0);
668 if (pme_lb->cutoff_scheme == ecutsVERLET &&
669 nbv->grp[0].kernel_type == nbnxnk8x8x8_CUDA)
671 nbnxn_cuda_pme_loadbal_update_param(nbv->cu_nbv, ic);
673 /* With tMPI + GPUs some ranks may be sharing GPU(s) and therefore
674 * also sharing texture references. To keep the code simple, we don't
675 * treat texture references as shared resources, but this means that
676 * the coulomb_tab texture ref will get updated by multiple threads.
677 * Hence, to ensure that the non-bonded kernels don't start before all
678 * texture binding operations are finished, we need to wait for all ranks
679 * to arrive here before continuing.
681 * Note that we could omit this barrier if GPUs are not shared (or
682 * texture objects are used), but as this is initialization code, there
683 * is not point in complicating things.
685 #ifdef GMX_THREAD_MPI
690 #endif /* GMX_THREAD_MPI */
694 init_interaction_const_tables(NULL, ic, bUsesSimpleTables,
698 if (pme_lb->cutoff_scheme == ecutsVERLET && nbv->ngrp > 1)
700 init_interaction_const_tables(NULL, ic, bUsesSimpleTables,
704 if (cr->duty & DUTY_PME)
706 if (pme_lb->setup[pme_lb->cur].pmedata == NULL)
708 /* Generate a new PME data structure,
709 * copying part of the old pointers.
711 gmx_pme_reinit(&set->pmedata,
712 cr, pme_lb->setup[0].pmedata, ir,
715 *pmedata = set->pmedata;
719 /* Tell our PME-only node to switch grid */
720 gmx_pme_send_switchgrid(cr, set->grid, set->ewaldcoeff);
725 print_grid(NULL, debug, "", "switched to", set, -1);
728 if (pme_lb->stage == pme_lb->nstage)
730 print_grid(fp_err, fp_log, "", "optimal", set, -1);
736 void restart_pme_loadbal(pme_load_balancing_t pme_lb, int n)
741 static int pme_grid_points(const pme_setup_t *setup)
743 return setup->grid[XX]*setup->grid[YY]*setup->grid[ZZ];
746 static real pme_loadbal_rlist(const pme_setup_t *setup)
748 /* With the group cut-off scheme we can have twin-range either
749 * for Coulomb or for VdW, so we need a check here.
750 * With the Verlet cut-off scheme rlist=rlistlong.
752 if (setup->rcut_coulomb > setup->rlist)
754 return setup->rlistlong;
762 static void print_pme_loadbal_setting(FILE *fplog,
764 const pme_setup_t *setup)
767 " %-7s %6.3f nm %6.3f nm %3d %3d %3d %5.3f nm %5.3f nm\n",
769 setup->rcut_coulomb, pme_loadbal_rlist(setup),
770 setup->grid[XX], setup->grid[YY], setup->grid[ZZ],
771 setup->spacing, 1/setup->ewaldcoeff);
774 static void print_pme_loadbal_settings(pme_load_balancing_t pme_lb,
777 gmx_bool bNonBondedOnGPU)
779 double pp_ratio, grid_ratio;
781 pp_ratio = pow(pme_loadbal_rlist(&pme_lb->setup[pme_lb->cur])/pme_loadbal_rlist(&pme_lb->setup[0]), 3.0);
782 grid_ratio = pme_grid_points(&pme_lb->setup[pme_lb->cur])/
783 (double)pme_grid_points(&pme_lb->setup[0]);
785 fprintf(fplog, "\n");
786 fprintf(fplog, " P P - P M E L O A D B A L A N C I N G\n");
787 fprintf(fplog, "\n");
788 /* Here we only warn when the optimal setting is the last one */
789 if (pme_lb->elimited != epmelblimNO &&
790 pme_lb->cur == pme_loadbal_end(pme_lb)-1)
792 fprintf(fplog, " NOTE: The PP/PME load balancing was limited by the %s,\n",
793 pmelblim_str[pme_lb->elimited]);
794 fprintf(fplog, " you might not have reached a good load balance.\n");
795 if (pme_lb->elimited == epmelblimDD)
797 fprintf(fplog, " Try different mdrun -dd settings or lower the -dds value.\n");
799 fprintf(fplog, "\n");
801 fprintf(fplog, " PP/PME load balancing changed the cut-off and PME settings:\n");
802 fprintf(fplog, " particle-particle PME\n");
803 fprintf(fplog, " rcoulomb rlist grid spacing 1/beta\n");
804 print_pme_loadbal_setting(fplog, "initial", &pme_lb->setup[0]);
805 print_pme_loadbal_setting(fplog, "final", &pme_lb->setup[pme_lb->cur]);
806 fprintf(fplog, " cost-ratio %4.2f %4.2f\n",
807 pp_ratio, grid_ratio);
808 fprintf(fplog, " (note that these numbers concern only part of the total PP and PME load)\n");
810 if (pp_ratio > 1.5 && !bNonBondedOnGPU)
812 md_print_warn(cr, fplog,
813 "NOTE: PME load balancing increased the non-bonded workload by more than 50%%.\n"
814 " For better performance use (more) PME nodes (mdrun -npme),\n"
815 " or in case you are beyond the scaling limit, use less nodes in total.\n");
819 fprintf(fplog, "\n");
823 void pme_loadbal_done(pme_load_balancing_t pme_lb,
824 t_commrec *cr, FILE *fplog,
825 gmx_bool bNonBondedOnGPU)
827 if (fplog != NULL && (pme_lb->cur > 0 || pme_lb->elimited != epmelblimNO))
829 print_pme_loadbal_settings(pme_lb, cr, fplog, bNonBondedOnGPU);
832 /* TODO: Here we should free all pointers in pme_lb,
833 * but as it contains pme data structures,
834 * we need to first make pme.c free all data.