How do I tell Open MPI to use processor and/or memory affinity?
Assuming that your system supports processor and memory affinity (check ompi_info for “paffinity” and “maffinity” components), you can explicitly tell Open MPI to use them when running MPI jobs. Note that memory affinity support is enabled only when processor affinity is enabled. Specifically: using memory affinity does not make sense if processor affinity is not enabled because processes may allocate local memory and then move to a different processor, potentially remote from the memory that it just allocated. Also note that processor and memory affinity is meaningless (but harmless) on uniprocessor machines. Open MPI 1.2 only offers coarse-grained controls for processor affinity. As such, it is best if the processes in an Open MPI job using processor affinity are the only intensive processes running on the nodes being used for the job. Specifically, since most schedulers do not (yet) provide information on which processors should be used for specific processes, Open MPI can only assu