/*! \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_loadbal_limited(FILE *fp_err, FILE *fp_log, gmx_int64_t step, pme_load_balancing_t pme_lb) { char buf[STRLEN], sbuf[22]; sprintf(buf, "step %4s: the %s limits the PME load balancing to a coulomb cut-off of %.3f", gmx_step_str(step, sbuf), pmelblim_str[pme_lb->elimited], pme_lb->setup[pme_loadbal_end(pme_lb)-1].rcut_coulomb); if (fp_err != NULL) { fprintf(fp_err, "\r%s\n", buf); } if (fp_log != NULL) { fprintf(fp_log, "%s\n", buf); } }