Hi,
I am trying to implement distributed fashion training using torch.distributed package.
in torch.distributed.init_process_group(.) I am getting an error  with deadlock.
here is error ;
0 4
Process Process-4:
Traceback (most recent call last):
File “/usr/lib/python3.6/multiprocessing/process.py”, line 258, in _bootstrap
self.run()
File “/usr/lib/python3.6/multiprocessing/process.py”, line 93, in run
self._target(*self._args, **self._kwargs)
File “main.py”, line 17, in init_process
dist.init_process_group(backend, rank=rank, world_size=size)
File “/sdd1/amit/venv/lib/python3.6/site-packages/torch/distributed/distributed_c10d.py”, line 407, in init_process_group
timeout=timeout)
File “/sdd1/amit/venv/lib/python3.6/site-packages/torch/distributed/distributed_c10d.py”, line 475, in _new_process_group_helper
timeout=timeout)
RuntimeError: Connection reset by peer
Here is code
10 def run(size, rank):
11     print(size, rank)
12
13 def init_process(rank, size, fn, backend=‘gloo’):
14     “”" Initialize the distributed environment. “”"
15     os.environ[‘MASTER_ADDR’] = ‘127.0.0.1’
16     os.environ[‘MASTER_PORT’] = ‘29500’
17     dist.init_process_group(backend, rank=rank, world_size=size)
18     fn(rank, size)
19
20
21 if name == “main”:
22     size = 4
23     processes = []
24     for rank in range(size):
25         p = Process(target=init_process, args=(rank, size, run))
26         p.start()
27         processes.append§
28
29     for p in processes:
30         p.join()