'MASTER_ADDR & MASTER_PORT in PyTorch DDP

I am new to PyTorch DDP. Using it for the first time. As per the documentation: https://pytorch.org/docs/stable/distributed.html, MASTER_PORT should be the free port with rank 0 while MASTER_ADDR address of rank 0 nodes. These parameters are required to help rendezvous. My question is: "How I can find these two parameters on Mac or any other server?" Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source