Le 01/10/2010 10:56, Ondrej Marsalek a écrit : > Hi again, > > I have a question regarding parallelization using both MPI and threads > in a NUMA setup. I would like to be able to use one MPI process per > socket or NUMA node and use threads within each MPI process to use all > the cores. Can I use hwloc to put and keep all of these in the right > places? > > Thanks, > Ondrej >
It mostly depends on the MPI implementation. Several of them are switching to hwloc for binding, so you will likely have a mpiexec option to do so. Otherwise, assuming mpiexec does not bind anything and you have 4 numa nodes, you can do it manually with something like: mpiexec --np 1 hwloc-bind node:0 myprog : -np 1 hwloc-bind node:1 myrog : -np 2 hwloc-bind node:2 myprog : -np 3 hwloc-bind node:3 myprog which runs 4 instances of "myprog" and bind them on different numa nodes. Brice