Fix DD load balancing bug with GPU sharing
authorSzilárd Páll <pall.szilard@gmail.com>
Tue, 19 Nov 2013 02:00:24 +0000 (03:00 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 19 Nov 2013 15:18:03 +0000 (16:18 +0100)
commit904d4645ca712bd58e0a22fcdebead0291ec19d3
tree9d925557944ff923d98533abf5f87640b554c346
parentdf56b1e5ebf2868cb487cb5143da3b02d9838f77
Fix DD load balancing bug with GPU sharing

The recent DD load balancing fix which solved the issue of incorrect
imbalance measure with GPU sharing (ba8232e9) addressed GPUs with
incorrect indexing. This caused out of bounds indexing in the GPU ID
query function. The query function also had a bug in the error checking
which allowed the incorrect indexing.
Now also mdrun -nb cpu -gpu_id ... is allowed, which before would give
a fatal error.

This commit addresses both issues; fixes #1385

Change-Id: I2800f610b873da92afe78bbfd869258f378ba2d7
src/gmxlib/gpu_utils/gpu_utils.cu
src/kernel/runner.c
src/mdlib/domdec.c