1. A computer-implemented method for resource allocation comprising: allocating a first plurality of processing elements within an array for computational purposes, based on a flow graph; and allocating a second plurality of processing elements, based on the flow graph, for communication purposes including communication between the first plurality of processing elements.