Note that there are some explanatory texts on larger screens.

plurals
  1. POMPI_Send and MPI_Recv
    primarykey
    data
    text
    <p>I installed MPICH2 to two computers ( 'suaddell' and 'o01' ) with Windows 7 operating system. I use VC++ Express Edition 2008 for compiling. Everything is good. I can run simple "Hello World" MPI applications in both hosts. But when I try to run simple MPI_Send and MPI_Recv applications, the program does not end, it hangs. I can see it runs without end on my computer and remote host by using Resource Monitor. If I press "Ctrl+C", it is ended and it displays below message, it pretends that every things work fine.</p> <hr> <h2>mpiexec command and the message after Ctrl+C</h2> <pre><code>C:\&gt;mpiexec.exe -hosts 2 suaddell o01 -noprompt mesajlasma.exe mpiexec aborting job... Received Message :Hello World _OK!_ job aborted: rank: node: exit code[: error message] 0: suaddell: 123: mpiexec aborting job 1: o01: 123 </code></pre> <hr> <h2>the code is here:</h2> <pre><code>#include "stdafx.h" #include "string.h" #include "mpi.h" int main(int argc, char* argv[]) { int nTasks, rank; char mesaj[20]; MPI_Status status; MPI_Init(&amp;argc,&amp;argv); MPI_Comm_size(MPI_COMM_WORLD,&amp;nTasks); MPI_Comm_rank(MPI_COMM_WORLD,&amp;rank); if(rank == 1) { strcpy_s(mesaj, "Hello World"); if (MPI_SUCCESS==MPI_Send(mesaj, strlen(mesaj)+1, MPI_CHAR, 0, 7, MPI_COMM_WORLD)) printf("_OK!_\n"); } if(rank == 0) { MPI_Recv(mesaj, 20, MPI_CHAR, 1, 7, MPI_COMM_WORLD, &amp;status); printf("Received Message :%s\n", mesaj); } MPI_Finalize(); return 0; } </code></pre> <hr> <h2>When the program runs by using "-verbose" , i can see that the system is waiting here untill pressing "Ctrl+C":</h2> <p><em>. (There are a lot of lines here) .</em></p> <pre><code>......command written to left: "cmd=result src=0 dest=2 tag=5 cmd_tag=0 ctx_key= 0 result=SUCCESS " ......\smpd_free_command .......\smpd_init_command ......./smpd_init_command ....../smpd_free_command ...../smpd_state_writing_cmd ..../smpd_handle_op_write ....sock_waiting for the next event. ....\SMPDU_Sock_wait </code></pre> <p><em>(this is the last line till I press "Ctrl+C")</em></p> <p>How can I fix this problem.</p> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload