The old code led to cr->nrank_pp_intranode=zero on PME ranks, which
meant that a command line of mpirun -np 4 mdrun -npme 2 on a two-GPU
node would fail, because gmx_select_gpu_ids() runs on all ranks, and
it calls limit_num_gpus_used() which thinks 0 PP ranks and 2 GPUs is
silly. Adding -gpu_id 01 works, of course, but that takes a different
code path in gmx_select_gpu_ids().
Change-Id: Iecd43ef9b71e2cc0339e93724b6b1071f0a159f6
rank_intranode++;
}
}
- if ((cr->duty & DUTY_PP) && num_pp[i] == mynum)
+ if (num_pp[i] == mynum)
{
nrank_pp_intranode++;
- if (i < rank_world)
+ if ((cr->duty & DUTY_PP) && i < rank_world)
{
rank_pp_intranode++;
}