Add initialization step before updates begin.

Use a barrier to stop network traffic before shutdown.

Use mutex around MPI calls.