title: MPI_Comm_split not working with MPI_Bcast
body: <p>With following code I am splitting 4 processes in column groups, then broadcasting in same column from diagonal (0,3). Process 0 broadcasts to 2. And 3 should broadcast to 1. But it is not working as expected. Can some one see whats wrong ?</p>
  <pre><code>0 1
  2 3
  
      #include &lt;stdio.h&gt;
      #include &lt;stdlib.h&gt;
      #include &lt;iostream&gt;
      #include &lt;mpi.h&gt;
      #include &lt;mpi.h&gt;
      using namespace std;
      
      int main(int argc, char **argv){
          MPI_Comm col_comm,row_comm;
          int myrank, size, even, value=0;
          int localRank=0;
          MPI_Init (&amp;argc, &amp;argv);
          MPI_Comm_rank (MPI_COMM_WORLD, &amp;myrank);
          MPI_Comm_size (MPI_COMM_WORLD, &amp;size);      
          MPI_Comm_split(MPI_COMM_WORLD, myrank%2, myrank, &amp;col_comm); 
          MPI_Comm_rank (col_comm, &amp;localRank);
              
          if(myrank%3==0){
              value = myrank*5+1;
              MPI_Bcast(&amp;value, 1, MPI_INT, localRank, col_comm);
          }
          
          printf(&quot;Rank=%d | LocalRank=%d | Got broadcast value of %d\n&quot;, myrank, localRank, value);
          MPI_Finalize();
          return 0;
      }
  </code></pre>
  <p>The Output</p>
  <pre><code>ubuntu@root:~/matrixmult$ mpirun comtest -np 4
  Rank=0 | LocalRank=0 | Got broadcast value of 1
  Rank=1 | LocalRank=0 | Got broadcast value of 0
  Rank=2 | LocalRank=1 | Got broadcast value of 0
  Rank=3 | LocalRank=1 | Got broadcast value of 16
  </code></pre>