Optimizations for Energy Efficiency within Distributed Memory Programming Models