A scalable weakly-synchronous algorithm for solving partial differential equations