Commit 4b010b46 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

adds debug printout

parent c9992383
Pipeline #95746 failed with stages
in 34 minutes and 13 seconds
......@@ -291,6 +291,7 @@ public:
// Some processes might not be involved
if(nb_processes_involved <= my_rank){
DEBUG_MSG("warning: nb_processes_involved <= my_rank, and this process is exiting p2p_distr_mpi::compute_distr now.\nHowever, there is a check below which calls an MPI_Gather over MPI_COMM_WORLD.\n");
return;
}
......@@ -492,10 +493,14 @@ public:
if(descriptor.isRecv == false){
whatNext.emplace_back(std::pair<Action,int>{NOTHING_TODO, -1});
mpiRequests.emplace_back();
AssertMpi(MPI_Isend(const_cast<partsize_t*>(&descriptor.nbParticlesToExchange),
1, particles_utils::GetMpiType(partsize_t()),
descriptor.destProc, TAG_NB_PARTICLES,
current_com, &mpiRequests.back()));
AssertMpi(MPI_Isend(
const_cast<partsize_t*>(&descriptor.nbParticlesToExchange),
1,
particles_utils::GetMpiType(partsize_t()),
descriptor.destProc,
TAG_NB_PARTICLES,
current_com,
&mpiRequests.back()));
#ifndef NDEBUG // Just for assertion
willsend[descriptor.destProc] += 1;
#endif
......@@ -581,6 +586,9 @@ public:
for(int idxproc = 0 ; idxproc < nb_processes_involved ; ++idxproc){
for(int idxtest = 0 ; idxtest < nb_processes_involved ; ++idxtest){
DEBUG_MSG("p2p_distr_mpi::compute_distribution, comparing willsendall(%d, %d)=%d with willrecvall(%d, %d) = %d\n",
idxproc, idxtest, willsendall[idxproc*nb_processes_involved + idxtest],
idxtest, idxproc, willrecvall[idxtest*nb_processes_involved + idxproc]);
assert(willsendall[idxproc*nb_processes_involved + idxtest]
== willrecvall[idxtest*nb_processes_involved + idxproc]);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment