title: How to send and receive string using MPI
body: <p>I am trying to send and recieve string using MPI but results are hopless.</p>
  
  <p>Send function:</p>
  
  <pre><code>MPI_Send(&amp;result, result.size(), MPI_CHAR, 0, 0, MPI_COMM_WORLD);
  </code></pre>
  
  <p>And the recv function:</p>
  
  <pre><code>    MPI_Recv(&amp;result,      /* message buffer */
          128,                 /* one data item */
          MPI_CHAR,        /* of type char real */
          MPI_ANY_SOURCE,    /* receive from any sender */
          MPI_ANY_TAG,       /* any type of message */
          MPI_COMM_WORLD,    /* default communicator */
          &amp;status);          /* info about the received message */
  </code></pre>
  
  <p>Where result is a string.</p>
  
  <p>I didn't get any error but program doesn't want to finish. </p>