| 1105 | } |
| 1106 | |
| 1107 | void MPIOffloadDevice::submitWork() |
| 1108 | { |
| 1109 | if (commandBuffer.available() == commandBuffer.capacity()) { |
| 1110 | postStatusMsg(OSP_LOG_ERROR) |
| 1111 | << "submit on empty command buffer attempted, should not happen!"; |
| 1112 | return; |
| 1113 | } |
| 1114 | |
| 1115 | auto view = commandBuffer.getWrittenView(); |
| 1116 | |
| 1117 | networking::BufferWriter header; |
| 1118 | header << view->size(); |
| 1119 | |
| 1120 | fabric->sendBcast(header.buffer); |
| 1121 | |
| 1122 | postStatusMsg(OSP_LOG_DEBUG) |
| 1123 | << "#osp.mpi.app: submitting buffer with " << nBufferedCommands |
| 1124 | << " commands, size: " << view->size(); |
| 1125 | |
| 1126 | // Make view of the valid set of commands in the buffer and submit them |
| 1127 | fabric->sendBcast(view); |
| 1128 | nBufferedCommands = 0; |
| 1129 | |
| 1130 | // Write new commands to a new buffer while the previous buffer is sent |
| 1131 | // out asynchronously |
| 1132 | commandBuffer = networking::FixedBufferWriter(commandBufferSize); |
| 1133 | } |
| 1134 | |
| 1135 | int MPIOffloadDevice::rootWorkerRank() const |
| 1136 | { |
nothing calls this directly
no test coverage detected