LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Bogdan Costescu (bogdan.costescu_at_[hidden])
Date: 2004-03-17 07:05:50


On Tue, 16 Mar 2004, Marcelo Roitburd wrote:

> how i can know what cpu it run the processor not just the hostname?

MPI doesn't have such capabilities, so you'll have to call some
functions of your own.

It depends very much on the OS where the processes are running. Some
OSes (like SGI's IRIX) have the concept of processor sets where a
process is assigned such a set and any threads/processes created by
this process can never execute on other processors.
On Linux, using the standard kernel, it is not possible to confine a
process to a given CPU. There were CPU affinity patches since kernel
2.2 days, more recently there is some work in this direction related
to NUMA systems (like Opteron SMP).

The question is: why do you want to know on which CPU the process is
running ? Do certain CPUs from the system have special properties ? Or
do you want to know if it's a physical CPU or a logical one (when
using hyperthreading) ?

-- 
Bogdan Costescu
IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu_at_[hidden]