35#if defined (_WIN32) || defined (_WIN64)
37#elif defined (__unix__)
67MPICommunicator::MPICommunicator()
106 for (
int i = 1;
i < numprocs;
i++) {
109 for (
int i = 1;
i < numprocs;
i++) {
159 string str =
ss.str();
160 int scount =
static_cast<int>(
str.length());
274 for (
j = 0;
j <
i;
j++) {
282 map[
i] = devices[counter];
#define VF_LOG_CRITICAL(...)
static std::shared_ptr< Communicator > instance
static std::mutex instantiation_mutex
A class uses MPI library to communication.
double reduceSum(double quantityPerProcess) const override
void * getNativeCommunicator() override
void allGather(std::vector< int > &svalues, std::vector< int > &rvalues) override
bool isRoot() const override
void abort(int errorcode) override
int getProcessID() const override
void receiveNonBlocking(real *rbuf, int count_r, int sourceRank) override
int getBundleRoot() const override
~MPICommunicator() override
void send(real *sbuf, int count_s, int nb_rank) const override
int getNumberOfBundles() const override
void allReduceSum(std::vector< float > &values) override
int mapCudaDevicesOnHosts(const std::vector< unsigned int > &devices, int numberOfDevices) const override
int getNumberOfProcesses() const override
void receiveSerializedObject(std::stringstream &ss, int source) override
void receiveSend(uint *buffer_receive, int size_buffer_recv, int neighbor_rank_recv, const uint *buffer_send, int size_buffer_send, int neighbor_rank_send) const override
int getProcessRoot() const override
void resetRequests() override
void sendNonBlocking(real *sbuf, int count_s, int destinationRank) override
void broadcast(int &value) override
void sendSerializedObject(std::stringstream &ss, int target) override
int getRoot() const override
std::vector< std::string > gather(const std::string &str) override
int getBundleID() const override
static std::shared_ptr< Communicator > getInstance()
int getNumberOfProcessesInBundle(int bundle) const override
std::shared_ptr< T > SPtr