parent
720647e17f
commit
ade9337486
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
class P2PRoleMakers(object):
|
|
||||||
def __init__(self):
|
|
||||||
from mpi4py import MPI
|
|
||||||
self.comm = MPI.COMM_WORLD
|
|
||||||
self.MPI = MPI
|
|
||||||
|
|
||||||
def get_endpoints(self, port_start):
|
|
||||||
rank = self.comm.Get_rank()
|
|
||||||
size = self.comm.Get_size()
|
|
||||||
import socket
|
|
||||||
local_ip = socket.gethostbyname(socket.gethostname())
|
|
||||||
hostname = socket.gethostname()
|
|
||||||
all_ips = self.comm.allgather(local_ip)
|
|
||||||
all_ports = [str(port_start + rank) for ]
|
|
||||||
return all_ports
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue