(args)
| 215 | |
| 216 | |
| 217 | def _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 | |
| 234 | def _init_simulation_sp(args): |