Actually determining process grid shape. Printing localarrays for debugging.