I see some open source code use MPI_Barrier before broadcasting the root value:
MPI_Barrier(MPI_COMM_WORLD); MPI_Bcast(buffer, N, MPI_FLOAT, 0, MPI_COMM_WORLD