Add an MPI barrier to avoid log outputs to be mixed up in a multi-processor
environment