title: PyTorch TypeError: scatter() missing 1 required positional argument: 'scatter_list'
body: <p>all. I have a problem with starting a distributed program while using “mpi” as the backend. The program is as follows:</p>
  
  <pre><code>def run(rank, size, hostname):
      print("I am {} of {} in {}".format(rank, size, hostname))
      tensor = torch.zeros(1)
      group=dist.new_group([0,1,2])
      if rank == 0:
          scatter_list=[torch.zeros(1) for _ in range(3)]
          dist.scatter(tensor= tensor, src=0, scatter_list=scatter_list, group=group)
          print("Master has completed Scatter")
      else:
          tensor += 1
          dist.scatter(tensor= tensor, src=0, group=group)
          print("worker has completed scatter")
      print('Rank', rank, 'has data', tensor[0])
  
  def init_process(rank, size, hostname, fn, backend='tcp'):
      dist.init_process_group(backend, rank=rank, world_size=size)
      fn(rank, size,hostname)
  
  if __name__ == "__main__":
      world_size = int(os.environ['OMPI_COMM_WORLD_SIZE'])
      world_rank = int(os.environ['OMPI_COMM_WORLD_RANK'])
      hostname = socket.gethostname()
      p = Process(target = init_process, 
                       args=(world_rank, world_size, hostname, run, 'mpi'))
      p.start()
      p.join()
  </code></pre>
  
  <p>However, when the program starts, it always throws an error like:</p>
  
  <pre><code>  File "mpi_test.py", line 17, in run
  dist.scatter(tensor= tensor, src=0, group=group)
  </code></pre>
  
  <p><code>TypeError: scatter() missing 1 required positional argument: 'scatter_list'</code></p>
  
  <p>The error is emitted by ranks 1 and 2 which don’t need argument: ‘scatter_list’.
  I tried many ways, but failed. Does anybody know why?
  Thanks for your reading.</p>