implement mpi gather vectors