Hello everyone,
I’m trying to play with the distributed pytorch package with MPI back end, but faced some problem here.
I configured four AWS EC2 instances (one as master and others as workers) and made worker nodes ssh-able from master node.  Then, on each nodes, I just simply run the following code:
import torch.distributed as dist
dist.init_process_group(backend='mpi', world_size=4)
print('Hello from process {} (out of {})!'.format(dist.get_rank(), dist.get_world_size()))

And on each node, I got output like
Hello from process 0 (out of 1)!

Can any person tell me how can I set the init_method interface in init_process_group to make this simple test code work? The expected output is something like:
Hello from process 0 (out of 4)!
Hello from process 1 (out of 4)!
Hello from process 2 (out of 4)!
Hello from process 3 (out of 4)!

Many thanks!