/*! \brief Print all load-balancing settings */ static void print_pme_loadbal_settings(pme_load_balancing_t *pme_lb, t_commrec *cr, FILE *fplog, gmx_bool bNonBondedOnGPU) { double pp_ratio, grid_ratio; real pp_ratio_temporary; pp_ratio_temporary = pme_loadbal_rlist(&pme_lb->setup[pme_lb->cur])/pme_loadbal_rlist(&pme_lb->setup[0]); pp_ratio = std::pow(static_cast<double>(pp_ratio_temporary), 3.0); grid_ratio = pme_grid_points(&pme_lb->setup[pme_lb->cur])/ (double)pme_grid_points(&pme_lb->setup[0]); fprintf(fplog, "\n"); fprintf(fplog, " P P - P M E L O A D B A L A N C I N G\n"); fprintf(fplog, "\n"); /* Here we only warn when the optimal setting is the last one */ if (pme_lb->elimited != epmelblimNO && pme_lb->cur == pme_loadbal_end(pme_lb)-1) { fprintf(fplog, " NOTE: The PP/PME load balancing was limited by the %s,\n", pmelblim_str[pme_lb->elimited]); fprintf(fplog, " you might not have reached a good load balance.\n"); if (pme_lb->elimited == epmelblimDD) { fprintf(fplog, " Try different mdrun -dd settings or lower the -dds value.\n"); } fprintf(fplog, "\n"); } fprintf(fplog, " PP/PME load balancing changed the cut-off and PME settings:\n"); fprintf(fplog, " particle-particle PME\n"); fprintf(fplog, " rcoulomb rlist grid spacing 1/beta\n"); print_pme_loadbal_setting(fplog, "initial", &pme_lb->setup[0]); print_pme_loadbal_setting(fplog, "final", &pme_lb->setup[pme_lb->cur]); fprintf(fplog, " cost-ratio %4.2f %4.2f\n", pp_ratio, grid_ratio); fprintf(fplog, " (note that these numbers concern only part of the total PP and PME load)\n"); if (pp_ratio > 1.5 && !bNonBondedOnGPU) { md_print_warn(cr, fplog, "NOTE: PME load balancing increased the non-bonded workload by more than 50%%.\n" " For better performance, use (more) PME ranks (mdrun -npme),\n" " or if you are beyond the scaling limit, use fewer total ranks (or nodes).\n"); } else { fprintf(fplog, "\n"); } }
static void print_pme_loadbal_setting(FILE *fplog, char *name, const pme_setup_t *setup) { fprintf(fplog, " %-7s %6.3f nm %6.3f nm %3d %3d %3d %5.3f nm %5.3f nm\n", name, setup->rcut_coulomb, pme_loadbal_rlist(setup), setup->grid[XX], setup->grid[YY], setup->grid[ZZ], setup->spacing, 1/setup->ewaldcoeff_q); }