Actually I am abit confused about this. I understand that I should set WORLD-SIZE as Number of nodes i.e 2. I am not sure what I should set as RANK but I set it as 0 and 1 for the two nodes. For the init_process_group` I pass each of the GPUs as in 0, 1, 2 ,3.  Something like this.
def init_processes(rank, size, fn, backend='nccl'):     dist.init_process_group(backend, rank=rank, world_size=size)     fn(rank, size)
if __name__ == "__main__": 
 size = 4     processes = []     for rank in range(size):         p = Process(target=init_processes, args=(rank, size, run))         p.start()         processes.append(p)
for p in processes:
    p.join()`