Hi @mrshenli.
Somehow, my Mac is better today. I got a warning and the results.
Warning: Unable to resolve hostname to a (local) address. Using the loopback address as fallback. Manually set the network interface to bind to with GLOO_SOCKET_IFNAME. (operator() at ../torch/lib/c10d/ProcessGroupGloo.cpp:496)
Warning: Unable to resolve hostname to a (local) address. Using the loopback address as fallback. Manually set the network interface to bind to with GLOO_SOCKET_IFNAME. (operator() at ../torch/lib/c10d/ProcessGroupGloo.cpp:496)
Rank  1  has data  tensor(1.)
Rank  0  has data  tensor(1.)

I think the issue is that it takes long time to “resolve hostname”. After export GLOO_SOCKET_IFNAME=en0. I got the result quickly.