9 #include "../../core/ActionMessage.hpp"
11 #include "gmlc/containers/BlockingQueue.hpp"
12 #include "helics/helics-config.h"
36 static void setMpiCommunicator(MPI_Comm communicator);
37 static void setStartServiceThread(
bool start);
39 std::string addMpiComms(
MpiComms* comm);
41 std::string getAddress(
MpiComms* comm);
45 void sendMessage(std::pair<int, int> address, std::vector<char> message)
47 txMessageQueue.emplace(address, std::move(message));
50 void sendAndReceiveMessages();
51 void drainRemainingMessages();
58 static MPI_Comm mpiCommunicator;
59 static bool startServiceThread;
61 std::mutex mpiDataLock;
62 std::vector<MpiComms*> comms;
63 gmlc::containers::BlockingQueue<std::pair<std::pair<int, int>, std::vector<char>>>
66 bool helics_initialized_mpi{
false};
67 std::atomic<int> comms_connected{0};
68 std::atomic<bool> startup_flag{
false};
69 std::atomic<bool> stop_service{
false};
70 std::unique_ptr<std::thread> service_thread;
Definition: MpiComms.h:24
Definition: MpiService.h:28
MpiService & operator=(const MpiService &)=delete
MpiService(const MpiService &)=delete
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14