If the patient's potassium requirement exceeds 100 mEq/L, or if the rate of potassium infusion approaches 0.5 mEq/kg/hr in the face of continued hypokalemia, magnesium should be supplemented.