OpenMPI will do this on its own. As shared memory in its mind is preferable to tcp. We can measure the difference here on the same kind of system (Sun x4600). If you want to force omitting tcp (should not be needed) run like this: