Techniques for communication optimization of parallel programs in an adaptive runtime system