diff --git a/src/gpu/VirtualFluids_GPU/Communication/Communicator.h b/src/gpu/VirtualFluids_GPU/Communication/Communicator.h index 72c4a136ece03098c10ea65493ba02a0109ed95d..dbb36474106f3a4b2701719a6a7326f1af4a659a 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/Communicator.h +++ b/src/gpu/VirtualFluids_GPU/Communication/Communicator.h @@ -30,53 +30,53 @@ namespace gpu class VIRTUALFLUIDS_GPU_EXPORT Communicator { public: - static Communicator* getInstanz(); - static Communicator* getInstanz(const int numberOfProcs); - void exchngBottomToTop(float* sbuf, float* rbuf, int count); - void exchngTopToBottom(float* sbuf, float* rbuf, int count); - void waitAll(); - void distributeGeometry(unsigned int* dataRoot, unsigned int* dataNode, int dataSizePerNode); - int getPID() const; - int getNummberOfProcess() const; - int getNeighbourTop(); - int getNeighbourBottom(); - void exchngData(float* sbuf_t, float* rbuf_t, float* sbuf_b, float* rbuf_b, int count); - void exchngDataNB(float* sbuf_t, int count_st, float* rbuf_t, int count_rt, float* sbuf_b, int count_sb, float* rbuf_b, int count_rb); - ////////////////////////////////////////////////////////////////////////// - void exchngDataGPU(real* sbuf, int count_s, real* rbuf, int count_r, int nb_rank); - void sendRecvGPU(real* sbuf, int count_s, real* rbuf, int count_r, int nb_rank); - void nbRecvDataGPU( real* rbuf, int count_r, int nb_rank ); - void nbSendDataGPU( real* sbuf, int count_s, int nb_rank ); - void waitallGPU(); - void sendDataGPU( real* sbuf, int count_s, int nb_rank ); - void waitGPU(int id); - void resetRequest(); - void barrierGPU(); - void barrier(); - ////////////////////////////////////////////////////////////////////////// - void exchngDataGeo(int* sbuf_t, int* rbuf_t, int* sbuf_b, int* rbuf_b, int count); - MPI_Comm getCommunicator(); - void startTimer(); - void stopTimer(); - double getTime(); - int mapCudaDevice(const int &rank, const int &size, const std::vector<unsigned int> &devices, const int &maxdev); + static Communicator* getInstanz(); + static Communicator* getInstanz(const int numberOfProcs); + void exchngBottomToTop(float* sbuf, float* rbuf, int count); + void exchngTopToBottom(float* sbuf, float* rbuf, int count); + void waitAll(); + void distributeGeometry(unsigned int* dataRoot, unsigned int* dataNode, int dataSizePerNode); + int getPID() const; + int getNummberOfProcess() const; + int getNeighbourTop(); + int getNeighbourBottom(); + void exchngData(float* sbuf_t, float* rbuf_t, float* sbuf_b, float* rbuf_b, int count); + void exchngDataNB(float* sbuf_t, int count_st, float* rbuf_t, int count_rt, float* sbuf_b, int count_sb, float* rbuf_b, int count_rb); + ////////////////////////////////////////////////////////////////////////// + void exchngDataGPU(real* sbuf, int count_s, real* rbuf, int count_r, int nb_rank); + void sendRecvGPU(real* sbuf, int count_s, real* rbuf, int count_r, int nb_rank); + void nbRecvDataGPU( real* rbuf, int count_r, int nb_rank ); + void nbSendDataGPU( real* sbuf, int count_s, int nb_rank ); + void waitallGPU(); + void sendDataGPU( real* sbuf, int count_s, int nb_rank ); + void waitGPU(int id); + void resetRequest(); + void barrierGPU(); + void barrier(); + ////////////////////////////////////////////////////////////////////////// + void exchngDataGeo(int* sbuf_t, int* rbuf_t, int* sbuf_b, int* rbuf_b, int count); + MPI_Comm getCommunicator(); + void startTimer(); + void stopTimer(); + double getTime(); + int mapCudaDevice(const int &rank, const int &size, const std::vector<unsigned int> &devices, const int &maxdev); protected: private: - static Communicator* instanz; - int numprocs, PID; - int nbrbottom, nbrtop; - MPI_Comm comm1d, commGPU; - MPI_Status status[4]; - MPI_Request request[4]; - ////////////////////////////////////////////////////////////////////////// - std::vector<MPI_Request> requestGPU; - int rcount; - ////////////////////////////////////////////////////////////////////////// - double starttime; - double endtime; - Communicator(); - Communicator(const int numberOfProcs); - Communicator(const Communicator&); + static Communicator* instanz; + int numprocs, PID; + int nbrbottom, nbrtop; + MPI_Comm comm1d, commGPU; + MPI_Status status[4]; + MPI_Request request[4]; + ////////////////////////////////////////////////////////////////////////// + std::vector<MPI_Request> requestGPU; + int rcount; + ////////////////////////////////////////////////////////////////////////// + double starttime; + double endtime; + Communicator(); + Communicator(const int numberOfProcs); + Communicator(const Communicator&); }; } // namespace GPU