add a barrier version and original version of collective mpi code