@lcw thanks.
Now I use two machines in the same network with addresses 192.168.206.100(called office0) and 192.168.206.101(called office1) respectively. Each can ping the other successfully.
I set the master_addr=192.168.206.100 and master_port=5234(random), then launch the master process on office0 and worker process on office1. the commands are as follows:
# launch on office0(192.168.206.100, as master)
python tutorial.py --rank=0 --num_gpus=0 --master_addr="192.168.206.100" --master_port="5024" --world_size=2

# launch on office1(192.168.206.101, as worker)
python tutorial.py --rank=1 --num_gpus=0 --master_addr="192.168.206.100" --master_port="5024" --world_size=2

I find the master process and worker process are created after the two commands. But the problem is both processes appear to be blocked until one times out.
on office0(192.168.206.100)

image1388×160 24.3 KB

on office1(192.168.206.101)

image1368×154 23.6 KB

each “@” indicates one or two minutes.
I don’t have a clue.