[mpich-discuss] MPICH associating process with a core

John Xu johnzxu at gmail.com
Tue Mar 2 11:30:20 CST 2010


Thanks a lot, Nicolas.

I am running MPI on my simulator and trying to evaluate MPI
performance with core hardware
changes. Therefore, I prefer to have deterministic simulation output
for mapping multiple processes into the processor
which may have several cores in one SMP processor.

My initial interest is to query which process falls on what core and
therefore I can correlate the performance
events with the process.

It will be nice to control which process going to a particular core as
well. But according to you, that is not
very easy to do. I will check out the Wiki pages as pointed out by you
to see if there is a way to do so.

I hope the process will not migrate between the cores, at least at
this stage of my evaluation.
Right now, I am not observing such behavior as it appears.
If it does, what is the proper way to enforce strong core affinity?
Can we do it on a core basis?

thanks,
john

On Tue, Mar 2, 2010 at 2:10 AM, Nicolas Rosner <nrosner at gmail.com> wrote:
> Hi John,
>
> Assuming correct understanding of your question: no, I don't think you
> can do that within the limits of the MPI standard itself. Also, you
> seem to be assuming strong processor affinity as a fact (as in "each
> process will always run on its initially assigned core"), which, as
> far as I know, is not necessarily the case.
>
> (In fact, it looks to me like the precise meaning of such a concept
> would depend rather heavily on the hardware architecture and
> OS-related factors of each system -- which is what makes me guess it
> would make sense for the Standard to stay above such lower-level
> issues.)
>
> If all you need is the ability to *find out* which physical CPU within
> an SMP machine is running a process: assuming your system supports
> this, it probably provides a way for you to find out by querying it
> directly (e.g. a syscall).
>
> If you need to *control* how processes are mapped to processors, maybe
> the more OS-specific layers/wrappers/utils of an MPI implementation
> might provide some higher-level assistant, e.g. check out
>
> http://wiki.mcs.anl.gov/mpich2/index.php/Using_the_Hydra_Process_Manager#Process-core_Binding
>
> (Also try googling "hwloc", and perhaps PLPA if you use Linux.)
>
> Perhaps you'd be willing to explain a bit more about what you're
> trying to use this for?  Do you really need a physical processor ID,
> or are you just trying to enforce a certain distribution of processes
> and/or behaviors?  Such needs can often be addressed at a higher level
> (without such a strong commitment to a certain flavor of scheduling,
> etc).
>
> Hope this helps,
>
> Nicolás
>


More information about the mpich-discuss mailing list