The Ultimate Fix to Life and Everything

* Added error checking.
* Added result correctness checking.
* Changed long to int so that it's the same for 32 and 64 bit machines. Int is sufficient to hold the size.
* Changed global work group size to be a multiple of the local one.