Optimally mapping a Stream graph on multicore processors