Just to make sure I got this right: are you saying that DDP with the Gloo backend works correctly, while RPC with the ProcessGroup backend does not work for you?
One thing to pay attention to: the DDP example you linked to only runs on a single machine, without using the network. (It spawns two processes, but they’re both local). So to make sure that DDP indeed works across the network you’ll probably have to change the example a bit and launch the two processes by hand on the two machines.