21 Dec
2013
21 Dec
'13
9:47 p.m.
Hello. This program deadlocks and I cannot see the reason. Would you please explain it to me? Thanks in advance int send_buf[10]; int recv_buf[10]; int i; for(i=0;i<world_size;++i) if (world_rank == 0) { // If we are rank 0, set the number to -1 and send it to process 1 printf("sent to process %d\n", i); MPI_Send(send_buf, 10, MPI_INT, 1, 0, MPI_COMM_WORLD); } printf("process %d\n", world_rank); MPI_Recv(recv_buf, 10, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); printf("Process %d received %d bytes from process 0\n", world_rank, 10);
4594
Age (days ago)
4594
Last active (days ago)
0 comments
1 participants
participants (1)
-
Soheil Hooshdaran