0

What exactly is the third parameter in the following MPI command

mpiexec -n 2 cpi

Is it no. of cores? So if I am running on Pentium 4 , shall I make it 1?

rene
  • 41,474
  • 78
  • 114
  • 152
gpuguy
  • 4,607
  • 17
  • 67
  • 125

1 Answers1

2
  • -n 2: spawn two processes.
  • cpi: the executable.

Experiment with what is faster, one or two or more processes. Some codes run best with one process per core, some codes benefit from oversubscription.

Adam
  • 16,808
  • 7
  • 52
  • 98
  • On a single core machine, if I give -n 2, it means two processes will work in time sharing mode. Am I right? – gpuguy Oct 12 '13 at 06:22
  • Ok. I have another issue to [launch the jobs on multiple PCs](http://stackoverflow.com/questions/19332339/mpi-running-the-code-across-multiple-pcs-in-lan). I hope you can help me out – gpuguy Oct 13 '13 at 10:05
  • @gpuguy that's a question about how to install MPICH2 on a cluster. I've never done that, I don't know what's involved. – Adam Oct 13 '13 at 10:06