Adding some code to determine which MPI ranks exist on the same hardware.