{
/* now broadcast everything to the non-master nodes/threads: */
init_parallel(cr, inputrec, mtop);
+
+ /* The master rank decided on the use of GPUs,
+ * broadcast this information to all ranks.
+ */
+ gmx_bcast_sim(sizeof(bUseGPU), &bUseGPU, cr);
}
+
if (fplog != NULL)
{
pr_inputrec(fplog, 0, "Input Parameters", inputrec, FALSE);
cr->npmenodes = 0;
}
+ if (bUseGPU && cr->npmenodes < 0)
+ {
+ /* With GPUs we don't automatically use PME-only ranks. PME ranks can
+ * improve performance with many threads per GPU, since our OpenMP
+ * scaling is bad, but it's difficult to automate the setup.
+ */
+ cr->npmenodes = 0;
+ }
+
#ifdef GMX_FAHCORE
if (MASTER(cr))
{
(cr->duty & DUTY_PP) == 0,
inputrec->cutoff_scheme == ecutsVERLET);
- if (PAR(cr))
- {
- /* The master rank decided on the use of GPUs,
- * broadcast this information to all ranks.
- */
- gmx_bcast_sim(sizeof(bUseGPU), &bUseGPU, cr);
- }
-
if (bUseGPU)
{
- if (cr->npmenodes == -1)
- {
- /* Don't automatically use PME-only nodes with GPUs */
- cr->npmenodes = 0;
- }
-
/* Select GPU id's to use */
gmx_select_gpu_ids(fplog, cr, &hwinfo->gpu_info, bForceUseGPU,
&hw_opt->gpu_opt);