Fixed communication bug in MPI version
Fixed gridmanager to properly calculate grid dimensions for any number of shards