<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>What error are you seeing? Is this the complete code? For instance, you never call MPI_Init or finalize here. </div><div><br>On Jan 3, 2014, at 1:35 AM, Soheil Hooshdaran <<a href="mailto:shooshdaran577@gmail.com">shooshdaran577@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi.<div>What's wrong with my code?</div><div><div><ol><li>  char send_buf[12]  = "hello world";<br></li><li>  char send_buf2[12]  = "hello iran";<br></li><li>  char recv_buf[10];<br></li>
<li>  int i;<br></li><li>  for(i=0;i<10;++i)<br></li><li>  if (world_rank == 0) {<br></li><li>    MPI_Send(send_buf, 12, MPI_CHAR, 1, 0, MPI_COMM_WORLD);<br></li><li>    //MPI_Send(send_buf2, 12, MPI_INT, 1, 1, MPI_COMM_WORLD);<br>
</li><li>  } else if (world_rank == 1) {<br></li><li>    MPI_Recv(recv_buf, 12, MPI_CHAR, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);<br></li><li>    printf("Process 1 received %s from process 0\n", recv_buf);<br>
</li><li>  }<br></li></ol></div><div>  </div></div><div>Run-time errors are very hard to fix!Help me please</div><div><br></div><div>Thanks in advance</div><div>Soheil Hooshdaran</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a></span><br><span>To manage subscription options or unsubscribe:</span><br><span><a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></span></div></blockquote></body></html>