LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Neil Storer (Neil.Storer_at_[hidden])
Date: 2004-03-17 06:51:20


Marcello,

Normally the operating system will schedule your process on any available CPU at
the next sceduling interval (the time it needs to use a CPU). This means that if
you have a multi-CPU system (SMP) each MPI process will skip around from CPU to
CPU (maybe using each one for only a few microseconds at a time), so knowing
which CPU you are executing on at any one instant doesn't really help.

There are systems which allow you to bind to a CPU, but these normally require
that you call a system routine to explicitly state which CPU you want to bind to
(e.g. the "bindprocessor" utility/function on AIX). This is usually done to
exploit cache or memory affinity. In this case you know which CPU it is running
on- it's the one you asked for.

That's why 'MPI_Get_processor_name' usually just gives you the hostname.

Regards
        Neil

Marcelo Roitburd wrote:
> Dear All!
>
> I know that have the function MPI_Get_processor_name , this return the the
> hostname to the processor, if one computer have more than 1 cpu , how i
> can know what cpu it run the processor not just the hostname?
>
> thankx
>
> Marcelo
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/

-- 
+-----------------+---------------------------------+------------------+
| 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 |
    +-----------------------------------------------------------------+