Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPI on a single machine dualcore

What happend if I ran an MPI program which require 3 nodes (i.e. mpiexec -np 3 ./Program) on a single machine which has 2 cpu?

like image 816
Rich Avatar asked Nov 24 '10 22:11

Rich


1 Answers

This depends on your MPI implementation, of course. Most likely, it will create three processes, and use shared memory to exchange the messages. This will work just fine: the operating system will dispatch the two CPUs across the three processes, and always execute one of the ready processes. If a process waits to receive a message, it will block, and the operating system will schedule one of the other two processes to run - one of which will be the one that is sending the message.

like image 152
Martin v. Löwis Avatar answered Sep 19 '22 19:09

Martin v. Löwis