Marcelo,
LAM-MPI has no control over which CPU you use.
My understanding is that by saying each node has 2 CPUs and you want to run 20
MPI processes, LAM-MPI will run the first 2 on one node (server or computer),
the second 2 on the other node, the next 2 on the first node, the next 2 on the
other node ... and so on.
i.e. Node1 gets processes 0, 1, 4, 5, 8, 9, 12, 13, 16, 17
Node2 gets processes 2, 3, 6, 7, 10, 11, 14, 15, 18, 19
You could tell LAM-MPI that there is only 1 CPU on each of the 2 nodes. In this
case LAM starts the processes such that:
Node1 gets processes 0, 2, 4, 6, 8, 10, 12, 14, 16, 18
Node2 gets processes 1, 3, 5, 7, 9, 11, 13, 15, 17, 19
You could also "lie" and tell it you have 5 CPUs in a node. In which case:
Node1 gets processes 0, 1, 2, 3, 4, 10, 11, 12, 13, 14
Node2 gets processes 5, 6, 7, 8, 9, 15, 16, 17, 18, 19
The operating system on each node should then schedule the MPI processes that
are running on that node to whichever CPU is available for running user
processes in that scheduling interval. Even then, each time you ask a process
"which CPU is this process running on" you could be unlucky and find that every
time the answer is "CPU 0", even though the process is being run sometimes on
CPU-0 and sometimes on CPU-1. It just depends which CPU the OS has scheduled you
to run on in that scheduling interval.
The best way of checking is to look at the CPU utilisation while your job is
running using "sar" or "topas", "systop" or some other system utility.
If your program is totally CPU-bound you should be able to see that you are
using 100% of both CPUs on each node. If your program is NOT CPU-bound, then
write a simple one (matrix multiply, or DAXPY is a good bet) and try it with that.
Regards
Neil
--
+-----------------+---------------------------------+------------------+
| Neil Storer | Head: Systems S/W Section | Operations Dept. |
+-----------------+---------------------------------+------------------+
| ECMWF, | email: neil.storer_at_[hidden] | //=\\ //=\\ |
| Shinfield Park, | Tel: (+44 118) 9499353 | // \\// \\ |
| Reading, | (+44 118) 9499000 x 2353 | ECMWF |
| Berkshire, | Fax: (+44 118) 9869450 | ECMWF |
| RG2 9AX, | | \\ //\\ // |
| UK | URL: http://www.ecmwf.int/ | \\=// \\=// |
+--+--------------+---------------------------------+----------------+-+
| ECMWF is the European Centre for Medium-Range Weather Forecasts |
+-----------------------------------------------------------------+
|