While there has been significant prior research on improving the energy-efficiency of parallel applications, there has been much less on optimizing them for green energy sources, which expose rapid changes in power's availability (or cost) due to the use of local renewable energy (or utility demand response programs). In this article, we present energy management policies that utilize active and inactive power capping to improve the performance of rigid and elastic parallel tasks when subject to variable power constraints from green energy sources. We deploy our policies on a real cloud testbed, and evaluate the performance with three different parallel applications. Our results demonstrate the effectiveness of green energy management policies with variable power. For example, we show that a reference supercomputer benchmark application requires 17% more time and 9% more energy to complete when power varies based on real-time electricity prices versus when power is unlimited at a fixed price; however, since the real-time spot market prices are lower than fixed prices, the total electricity cost of our best energy management policy when using real-time prices is 67% less than when using fixed prices.