I tried to use torch.distributed.init_process_group(backend=‘gloo’, init_method=‘env://’, world_size=2, rank=0) to initialize it. I do not know what should “init_method” be
It raise a problem, and here it is.
File “train.py 7”, line 64, in main
torch.distributed.init_process_group(backend=‘gloo’, init_method=‘env://’, world_size=2, rank=0)
File “/usr/local/lib/python3.5/dist-packages/torch/distributed/init.py”, line 49, in init_process_group
group_name, rank)
RuntimeError: failed to read the MASTER_PORT environmental variable; maybe you forgot to set it? at /pytorch/torch/lib/THD/process_group/General.cpp:17