| 19 | // (do nothing here) |
| 20 | } |
| 21 | void AsyncWriter::exec(const async::ExecInfo& info, const AsyncWriterExec& params) { |
| 22 | const void* data = info.buffer(PlanId); |
| 23 | const size_t size = info.bufferSize(PlanId); |
| 24 | const char* strData = reinterpret_cast<const char*>(data); |
| 25 | |
| 26 | int rank = 0; |
| 27 | MPI_Comm_rank(MPI_COMM_WORLD, &rank); |
| 28 | if (printPlan && rank == 0) { |
| 29 | logInfo(rank) << "Printing current plan:" << std::string(strData, strData + size); |
| 30 | } |
| 31 | |
| 32 | { |
| 33 | // for the Hdf5 implementations, we'll need to serialize writes |
| 34 | // (TODO: make one AsyncWriter only in total) |
| 35 | const std::lock_guard lock(globalLock); |
| 36 | writer = Writer(std::string(strData, strData + size)); |
| 37 | instance = std::optional(writer.beginWrite(info)); |
| 38 | // for now write synchronously |
| 39 | instance.value().close(); |
| 40 | instance.reset(); |
| 41 | } |
| 42 | } |
| 43 | void AsyncWriter::execWait(const async::ExecInfo& info) { |
| 44 | // TODO: async finalize |
| 45 | } |
nothing calls this directly
no test coverage detected