Search code examples
c++parallel-processingmulticorehpcopenmpi

Configure OpenMPI to run on a single machine (Debian/Linux)


I've installed OpenMPI on my Ubuntu 11.04 machine.

My understanding is that I type mpirun and magic happens.

What I don't understand is how to configure mpirun to make this magic happen only on my machine's two cores.

How do you configure OpenMPI to run on a single machine using multiple of its cores?


Solution

  • There's no configuration needed, just pass the "-n 2" option to mpirun and it will start two processes. The mpirun documentation provides further information.