Hi @mrshenli, thanks for the links. Unfortunately, I could not run the minimal example from the documentation. can you please correct me to run this?
Let’s say I can not proceed without the return value so I need rpc_sync.
I created two python scripts. The first one is:
# On worker 0:
import torch
import torch.distributed.rpc as rpc

rpc.init_rpc("worker0", rank=0, world_size=2)
ret = rpc.rpc_sync("worker1", torch.add, args=(torch.ones(2), 3))
rpc.shutdown()

and the second one is:
# On worker 1:
import torch.distributed.rpc as rpc
rpc.init_rpc("worker1", rank=1, world_size=2)
rpc.shutdown()

Then, when I execute the first script, I run into this error:
  File "process_0.py", line 4, in <module>
    rpc.init_rpc("worker0", rank=0, world_size=2)
  File "/data/anaconda3/lib/python3.7/site-packages/torch/distributed/rpc/__init__.py", line 60, in init_rpc
    init_method, rank=rank, world_size=world_size
  File "/data/anaconda3/lib/python3.7/site-packages/torch/distributed/rendezvous.py", line 48, in rendezvous
    raise RuntimeError("`url` must be a string. {}: {}".format(type(url), url))
RuntimeError: `url` must be a string. <class 'NoneType'>: None