Semi-implicit method for long time scale magnetohydrodynamic computations in three dimensions