0

I'm new to MPI programming. I'm in basic stage. So I use this command to run the program

mpirun -np 4 try

And this executes my program. I'm using MPICH NT. When I miss something an infinite loop starts. Suppose I fumbled with MPI_Send & MPI_Recv like

MPI_Send(&buf, 1, MPI_INT, 1, DEFAULT_TAG, MPI_COMM_WORLD);
MPI_Recv(&buf, 1, MPI_INT, 15, DEFAULT_TAG, MPI_COMM_WORLD, &status);

source & destination are wrong. Now while executing this command prompt froze. It doesn't allow me to do anything just froze. Then I had to restart the command prompt, again go to the directory etc. Imagine 50 times doing that..... How can I avoid restarting the command prompt? Is there any easy way to recover from the hung mode?

AtanuCSE
  • 8,832
  • 14
  • 74
  • 112
  • surely this is a duplicate? the process sends, waiting for a receive. the receive never happens because the process is sending. use non-blocking operations. – Rob Latham Dec 11 '14 at 21:41
  • I don't know what mpirun is, but most console programs respond to Ctrl+C to terminate operation. If that doesn't work, you can always kill mpirun.exe from task manager (Ctrl+Shift+Esc) – Ryan Bemrose Dec 12 '14 at 07:29
  • @RobLatham I know what it is. Question was how to recover this situation without shutting down the command prompt? – AtanuCSE Dec 14 '14 at 13:33
  • @RyanBemrose Okay I'll give them a shot as soon as I can – AtanuCSE Dec 14 '14 at 13:34
  • @RyanBemrose post it as an answer. – AtanuCSE Dec 28 '14 at 06:47

1 Answers1

0

Most console programs respond to Ctrl+C to terminate operation. If that doesn't work, you can always kill mpirun.exe from task manager (Ctrl+Shift+Esc)

Ryan Bemrose
  • 9,018
  • 1
  • 41
  • 54