master-worker pattern in mpi