Skip to content
Snippets Groups Projects
Commit cbe2494c authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Comment communication messages

parent b026d7ec
No related branches found
No related tags found
1 merge request!1Implement DEM and many other features
...@@ -97,7 +97,7 @@ void Regular6DStencil::fillArrays(int *neighbor_ranks, int *pbc, real_t *subdom) ...@@ -97,7 +97,7 @@ void Regular6DStencil::fillArrays(int *neighbor_ranks, int *pbc, real_t *subdom)
} }
void Regular6DStencil::communicateSizes(int dim, const int *send_sizes, int *recv_sizes) { void Regular6DStencil::communicateSizes(int dim, const int *send_sizes, int *recv_sizes) {
std::cout << "communicateSizes" << std::endl; //std::cout << "communicateSizes" << std::endl;
if(prev[dim] != rank) { if(prev[dim] != rank) {
MPI_Send(&send_sizes[dim * 2 + 0], 1, MPI_INT, prev[dim], 0, MPI_COMM_WORLD); MPI_Send(&send_sizes[dim * 2 + 0], 1, MPI_INT, prev[dim], 0, MPI_COMM_WORLD);
...@@ -118,7 +118,7 @@ void Regular6DStencil::communicateData( ...@@ -118,7 +118,7 @@ void Regular6DStencil::communicateData(
int dim, int elem_size, int dim, int elem_size,
const real_t *send_buf, const int *send_offsets, const int *nsend, const real_t *send_buf, const int *send_offsets, const int *nsend,
real_t *recv_buf, const int *recv_offsets, const int *nrecv) { real_t *recv_buf, const int *recv_offsets, const int *nrecv) {
std::cout << "communicateData" << std::endl; //std::cout << "communicateData" << std::endl;
const real_t *send_prev = &send_buf[send_offsets[dim * 2 + 0] * elem_size]; const real_t *send_prev = &send_buf[send_offsets[dim * 2 + 0] * elem_size];
const real_t *send_next = &send_buf[send_offsets[dim * 2 + 1] * elem_size]; const real_t *send_next = &send_buf[send_offsets[dim * 2 + 1] * elem_size];
...@@ -126,7 +126,7 @@ void Regular6DStencil::communicateData( ...@@ -126,7 +126,7 @@ void Regular6DStencil::communicateData(
real_t *recv_next = &recv_buf[recv_offsets[dim * 2 + 1] * elem_size]; real_t *recv_next = &recv_buf[recv_offsets[dim * 2 + 1] * elem_size];
if(prev[dim] != rank) { if(prev[dim] != rank) {
std::cout << rank << ": send " << nsend[dim * 2 + 0] << " elems to " << prev[dim] << ", recv " << nrecv[dim * 2 + 0] << " elems from " << next[dim] << std::endl; //std::cout << rank << ": send " << nsend[dim * 2 + 0] << " elems to " << prev[dim] << ", recv " << nrecv[dim * 2 + 0] << " elems from " << next[dim] << std::endl;
//MPI_Send(send_prev, nsend[dim * 2 + 0] * elem_size, MPI_DOUBLE, prev[dim], 0, MPI_COMM_WORLD); //MPI_Send(send_prev, nsend[dim * 2 + 0] * elem_size, MPI_DOUBLE, prev[dim], 0, MPI_COMM_WORLD);
//MPI_Recv(recv_prev, nrecv[dim * 2 + 0] * elem_size, MPI_DOUBLE, next[dim], 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); //MPI_Recv(recv_prev, nrecv[dim * 2 + 0] * elem_size, MPI_DOUBLE, next[dim], 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
...@@ -142,7 +142,7 @@ void Regular6DStencil::communicateData( ...@@ -142,7 +142,7 @@ void Regular6DStencil::communicateData(
} }
if(next[dim] != rank) { if(next[dim] != rank) {
std::cout << rank << ": send " << nsend[dim * 2 + 1] << " elems to " << next[dim] << ", recv " << nrecv[dim * 2 + 1] << " elems from " << prev[dim] << std::endl; //std::cout << rank << ": send " << nsend[dim * 2 + 1] << " elems to " << next[dim] << ", recv " << nrecv[dim * 2 + 1] << " elems from " << prev[dim] << std::endl;
//MPI_Send(send_next, nsend[dim * 2 + 1] * elem_size, MPI_DOUBLE, next[dim], 0, MPI_COMM_WORLD); //MPI_Send(send_next, nsend[dim * 2 + 1] * elem_size, MPI_DOUBLE, next[dim], 0, MPI_COMM_WORLD);
//MPI_Recv(recv_next, nrecv[dim * 2 + 1] * elem_size, MPI_DOUBLE, prev[dim], 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); //MPI_Recv(recv_next, nrecv[dim * 2 + 1] * elem_size, MPI_DOUBLE, prev[dim], 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
......
...@@ -176,7 +176,7 @@ void PairsSimulation::communicateSizes(int dim, const int *send_sizes, int *recv ...@@ -176,7 +176,7 @@ void PairsSimulation::communicateSizes(int dim, const int *send_sizes, int *recv
array_flags->setHostFlag(nrecv_id); array_flags->setHostFlag(nrecv_id);
array_flags->clearDeviceFlag(nrecv_id); array_flags->clearDeviceFlag(nrecv_id);
this->getDomainPartitioner()->communicateSizes(dim, send_sizes, recv_sizes); this->getDomainPartitioner()->communicateSizes(dim, send_sizes, recv_sizes);
PAIRS_DEBUG("send_sizes=[%d, %d], recv_sizes=[%d, %d]\n", send_sizes[dim * 2 + 0], send_sizes[dim * 2 + 1], recv_sizes[dim * 2 + 0], recv_sizes[dim * 2 + 1]); //PAIRS_DEBUG("send_sizes=[%d, %d], recv_sizes=[%d, %d]\n", send_sizes[dim * 2 + 0], send_sizes[dim * 2 + 1], recv_sizes[dim * 2 + 0], recv_sizes[dim * 2 + 1]);
} }
void PairsSimulation::communicateData( void PairsSimulation::communicateData(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment