Robust Algorithms for Solving Stochastic Partial Differential Equations