Oil rallies as top producers agree massive output cuts