Fix bug accumulating nrank_pp_intranode on PME ranks
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 31 Mar 2014 14:28:36 +0000 (16:28 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 2 Apr 2014 08:02:30 +0000 (10:02 +0200)
commit0870f68b80707ce34a40ad14d2db1c7535bbfeec
tree2d40792c2d32d56bfedc607ccc2921d70ccdaeed
parenta6ae71b20228b41783c7b55fbb86831466d68b1c
Fix bug accumulating nrank_pp_intranode on PME ranks

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
src/gromacs/gmxlib/network.c