[Beowulf] mpiexec task affinity

Chandler Wilkerson chwilk at rice.edu
Thu Sep 19 20:30:34 PDT 2013

Hello Reza,

I don't believe you can redefine mpiexec's environment on the fly 
(though there might be some magic you could find in MPI_Finalize() and 
MPI_Init() to redefine comm_world?)

If I was trying to do what you describe, I'd ask for all tasks on all 
nodes for my mpiexec, pin the tasks to threads with the relevant command 
line parameters (or use a rank file to be absolutely sure), then use 
logic within my program to have each parallel task decide what work it 
should do for a particular subsection of the program. e.g. with 8-core 
nodes, only perform work on even numbered tasks to get the 6X4 behavior, 
have odd nodes go to barrier, then for the 4X6 configuration, ask tasks 
0-5, 8-13, etc. to run your code and have the remainder barrier.


On 9/19/13 9:49 AM, reza azimi wrote:
> Hello guys,
> let me explain my question with an example:
> Assume I want to run 24 thread on my Beowulf cluster which use MPICH2 as
> the MPI library. I run these 24 threads on six servers giving each 4
> threads with "mpiexec" command. Can I change this configuration during
> the *run time* for example do it as 4*6 using 4 server and giving each 6
> thread?
> I am looking for something like task affinity in one server which you
> say what core do which pid with "taskset" comand without stopping the
> program.
> Let me know,
> Thanks
> Reza
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin Computing
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

More information about the Beowulf mailing list