title: MPI can not send data to oneself by MPI_Send and MPI_Recv
body: <p>I'm trying to implement <code>MPI_Bcast</code>, and I'm planning to do that by <code>MPI_Send</code> and <code>MPI_Recv</code> but seems I can not send message to myself?</p>
  
  <p>The code is as follow</p>
  
  <pre><code>void My_MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) {
       int comm_rank, comm_size, i;
       MPI_Comm_rank(comm, &amp;comm_rank);
       MPI_Comm_size(comm, &amp;comm_size);
       if(comm_rank==root){
           for(i = 0; i &lt; comm_size; i++){
                   MPI_Send(buffer, count, datatype, i, 0, comm);
           }
       }
       MPI_Recv(buffer, count, datatype, root, 0, comm, MPI_STATUS_IGNORE);
    }
  </code></pre>
  
  <p>Any suggestion on that? Or I should never send message to oneself and just do a memory copy?</p>