Skip to content
Snippets Groups Projects
Commit 8acb1a2c authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Reformat communicator

parent a2d0cc73
No related branches found
No related tags found
1 merge request!104Add Communication Hiding to GPU version
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment