raise an AssertionError if do_barrier fails

This removes a lot of boilerplate code.
15 files changed