Send a control message to a specific node. */
| 162 | |
| 163 | /** Send a control message to a specific node. */ |
| 164 | uint64_t CommLayer::sendControlMessageToNode(int nodeID, |
| 165 | APControl m, int argument) |
| 166 | { |
| 167 | assert(opt::rank == 0); |
| 168 | ControlMessage msg; |
| 169 | msg.id = m_msgID++; |
| 170 | msg.msgType = m; |
| 171 | msg.argument = argument; |
| 172 | |
| 173 | MPI_Send(&msg, sizeof msg, |
| 174 | MPI_BYTE, nodeID, APM_CONTROL, MPI_COMM_WORLD); |
| 175 | return msg.id; |
| 176 | } |
| 177 | |
| 178 | /** Receive a control message. */ |
| 179 | ControlMessage CommLayer::receiveControlMessage() |