MCPcopy
hub / github.com/FedML-AI/FedML / _init_simulation_mpi

Function _init_simulation_mpi

python/fedml/__init__.py:217–231  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

215
216
217def _init_simulation_mpi(args):
218 from mpi4py import MPI
219
220 comm = MPI.COMM_WORLD
221 process_id = comm.Get_rank()
222 world_size = comm.Get_size()
223 args.comm = comm
224 args.process_id = process_id
225 args.rank = process_id
226 args.worker_num = world_size
227 if process_id == 0:
228 args.role = "server"
229 else:
230 args.role = "client"
231 return args
232
233
234def _init_simulation_sp(args):

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected