Ensure that the global index is always unsigned.
Add a sanity check on the number of nodes. With the current code, we can
fill the memory of GPUs up to 16GB in single precision and 32GB in
double precision.