MCPcopy Create free account
hub / github.com/RenderKit/ospray / setupMaster

Function setupMaster

modules/mpi/ospray/MPIOffloadDevice.cpp:59–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static inline void setupMaster()
60{
61 MPI_Comm appComm;
62 MPI_CALL(Comm_split(world.comm, 1, world.rank, &appComm));
63
64 int size = 0;
65 int rank = 0;
66 MPI_Comm_size(appComm, &size);
67 MPI_Comm_rank(appComm, &rank);
68
69 postStatusMsg(OSP_LOG_INFO)
70 << "#w: app process " << rank << '/' << size << " (global " << world.rank
71 << '/' << world.size << ')';
72
73 MPI_CALL(Barrier(world.comm));
74 MPI_CALL(Comm_free(&appComm));
75
76 // -------------------------------------------------------
77 // at this point, all processes should be set up and synced. in
78 // particular:
79 // - app has intracommunicator to all workers (and vica versa)
80 // - app process(es) are in one intercomm ("app"); workers all in
81 // another ("worker")
82 // - all processes (incl app) have barrier'ed, and thus now in sync.
83}
84
85static inline void setupWorker()
86{

Callers 1

Calls 1

postStatusMsgFunction · 0.85

Tested by

no test coverage detected