Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions src/timeIntegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,24 +219,29 @@ double TimeIntegrator::ComputeBalance() {
}
computeMean /= idfx::psize;
imbalance = (computeMax-computeMin)/computeMean*100;

if(imbalance>allowedImbalance ) {
idfx::cout << "-------------------------------------------------------------"<< std::endl;
idfx::cout << "Warning: MPI imbalance found in this run " << std::endl;
idfx::cout << std::fixed;
for(int i = 0 ; i < idfx::psize ; i++) {
if(computeLogPerCore[i]/computeMean - 1> allowedImbalance/2/100) {
idfx::cout << "+" << 100*(computeLogPerCore[i]/computeMean-1)
<< "% (proc " << i << ")" << std::endl;
}
if(1-computeLogPerCore[i]/computeMean > allowedImbalance/2/100) {
idfx::cout << "-" << 100*(1-computeLogPerCore[i]/computeMean)
<< "% (proc " << i << ")" << std::endl;
// only show warnings if the imbalance is higher than 20%on GPUs
#if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) || defined(KOKKOS_ENABLE_SYCL)
if(imbalance>allowedImbalance ) {
idfx::cout << "-------------------------------------------------------------"
<< std::endl;
idfx::cout << "Warning: MPI imbalance found in this run " << std::endl;
idfx::cout << std::fixed;
for(int i = 0 ; i < idfx::psize ; i++) {
if(computeLogPerCore[i]/computeMean - 1> allowedImbalance/2/100) {
idfx::cout << "+" << 100*(computeLogPerCore[i]/computeMean-1)
<< "% (proc " << i << ")" << std::endl;
}
if(1-computeLogPerCore[i]/computeMean > allowedImbalance/2/100) {
idfx::cout << "-" << 100*(1-computeLogPerCore[i]/computeMean)
<< "% (proc " << i << ")" << std::endl;
}
}
idfx::cout << "You should probably check these nodes are running properly."
<< std::endl;
idfx::cout << "-------------------------------------------------------------"
<< std::endl;
}
idfx::cout << "You should probably check these nodes are running properly." << std::endl;
idfx::cout << "-------------------------------------------------------------"<< std::endl;
}
#endif
}
#endif
return(imbalance);
Expand Down
Loading