Skip to content

Commit 62c6bbe

Browse files
committed
#2201: temperedlb: add abort if we go over the threshold
1 parent 4f9e8bc commit 62c6bbe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vt/vrt/collection/balance/temperedlb/temperedlb.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -1188,13 +1188,19 @@ void TemperedLB::doLBStages(LoadType start_imb) {
11881188
);
11891189

11901190
if (has_memory_data_) {
1191+
double const memory_usage = computeMemoryUsage();
1192+
11911193
vt_debug_print(
11921194
terse, temperedlb,
11931195
"Current memory info: total memory usage={}, shared blocks here={}, "
1194-
"memory_threshold={}\n", computeMemoryUsage(),
1196+
"memory_threshold={}\n", memory_usage,
11951197
getSharedBlocksHere().size(), mem_thresh_
11961198
);
11971199

1200+
if (memory_usage > mem_thresh_) {
1201+
vtAbort("This should never be possible to go over the threshold\n");
1202+
}
1203+
11981204
computeClusterSummary();
11991205

12001206
// Verbose printing about local clusters

0 commit comments

Comments
 (0)