| 83 | } |
| 84 | |
| 85 | static inline void setupWorker() |
| 86 | { |
| 87 | MPI_CALL(Comm_split(world.comm, 0, world.rank, &worker.comm)); |
| 88 | |
| 89 | worker.makeIntraComm(); |
| 90 | |
| 91 | postStatusMsg(OSP_LOG_INFO) |
| 92 | << "master: Made 'worker' intercomm (through split): " << std::hex |
| 93 | << std::showbase << worker.comm << std::noshowbase << std::dec; |
| 94 | |
| 95 | MPI_CALL(Barrier(world.comm)); |
| 96 | |
| 97 | // ------------------------------------------------------- |
| 98 | // at this point, all processes should be set up and synced. in |
| 99 | // particular: |
| 100 | // - app has intracommunicator to all workers (and vica versa) |
| 101 | // - app process(es) are in one intercomm ("app"); workers all in |
| 102 | // another ("worker") |
| 103 | // - all processes (incl app) have barrier'ed, and thus now in sync. |
| 104 | } |
| 105 | |
| 106 | /////////////////////////////////////////////////////////////////////////// |
| 107 | // MPI initialization helper functions //////////////////////////////////// |
no test coverage detected