OPEC agrees to cut production, oil rises 8 percent