| 188 | /////////////////////////////////////////////////////////////////////////// |
| 189 | |
| 190 | MPIOffloadDevice::~MPIOffloadDevice() |
| 191 | { |
| 192 | try { |
| 193 | if (dynamic_cast<MPIFabric *>(fabric.get()) && world.rank == 0) { |
| 194 | postStatusMsg(OSP_LOG_INFO) << "shutting down mpi device"; |
| 195 | |
| 196 | sendWork( |
| 197 | [](networking::WriteStream &writer) { writer << work::FINALIZE; }, |
| 198 | true); |
| 199 | fabric = nullptr; |
| 200 | maml::shutdown(); |
| 201 | |
| 202 | MPI_Finalize(); |
| 203 | |
| 204 | RKCOMMON_IF_TRACING_ENABLED({ |
| 205 | char hostname[512] = {0}; |
| 206 | gethostname(hostname, 511); |
| 207 | const std::string masterTraceFile = |
| 208 | std::string(hostname) + "_master.json"; |
| 209 | rkcommon::tracing::saveLog( |
| 210 | masterTraceFile.c_str(), masterTraceFile.c_str()); |
| 211 | }); |
| 212 | } |
| 213 | } catch (const std::exception &e) { |
| 214 | handleError(OSP_UNKNOWN_ERROR, e.what()); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | void MPIOffloadDevice::initializeDevice() |
| 219 | { |
nothing calls this directly
no test coverage detected