[mpich-discuss] error recieving
Soheil Hooshdaran
shooshdaran577 at gmail.com
Fri Jan 3 01:35:19 CST 2014
Hi.
What's wrong with my code?
1. char send_buf[12] = "hello world";
2. char send_buf2[12] = "hello iran";
3. char recv_buf[10];
4. int i;
5. for(i=0;i<10;++i)
6. if (world_rank == 0) {
7. MPI_Send(send_buf, 12, MPI_CHAR, 1, 0, MPI_COMM_WORLD);
8. //MPI_Send(send_buf2, 12, MPI_INT, 1, 1, MPI_COMM_WORLD);
9. } else if (world_rank == 1) {
10. MPI_Recv(recv_buf, 12, MPI_CHAR, 0, 0, MPI_COMM_WORLD,
MPI_STATUS_IGNORE);
11. printf("Process 1 received %s from process 0\n", recv_buf);
12. }
Run-time errors are very hard to fix!Help me please
Thanks in advance
Soheil Hooshdaran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140103/0bf66339/attachment.html>
More information about the discuss
mailing list