@@ -65,14 +65,16 @@ void validatePersistedPhases(std::vector<PhaseType> expected_phases) {
65
65
EXPECT_EQ (expected_phases.size (), theNodeLBData ()->getLBData ()->node_data_ .size ());
66
66
EXPECT_EQ (expected_phases.size (), theNodeLBData ()->getLBData ()->node_subphase_comm_ .size ());
67
67
EXPECT_EQ (expected_phases.size (), theNodeLBData ()->getLBData ()->user_defined_json_ .size ());
68
- // EXPECT_EQ(expected_phases.size(), theNodeLBData()->getLBData()->user_defined_lb_info_.size());
68
+ EXPECT_EQ (expected_phases.size (), theNodeLBData ()->getLBData ()->user_defined_lb_info_ .size ());
69
+ EXPECT_EQ (expected_phases.size (), theNodeLBData ()->getLBData ()->node_user_attributes_ .size ());
69
70
// Check if each phase is present
70
71
for (auto && phase : expected_phases) {
71
72
EXPECT_TRUE (theNodeLBData ()->getLBData ()->node_comm_ .contains (phase));
72
73
EXPECT_TRUE (theNodeLBData ()->getLBData ()->node_data_ .contains (phase));
73
74
EXPECT_TRUE (theNodeLBData ()->getLBData ()->node_subphase_comm_ .contains (phase));
74
75
EXPECT_TRUE (theNodeLBData ()->getLBData ()->user_defined_json_ .contains (phase));
75
- // EXPECT_TRUE(theNodeLBData()->getLBData()->user_defined_lb_info_.contains(phase));
76
+ EXPECT_TRUE (theNodeLBData ()->getLBData ()->user_defined_lb_info_ .contains (phase));
77
+ EXPECT_TRUE (theNodeLBData ()->getLBData ()->node_user_attributes_ .contains (phase));
76
78
}
77
79
#else
78
80
(void )expected_phases;
@@ -81,21 +83,20 @@ void validatePersistedPhases(std::vector<PhaseType> expected_phases) {
81
83
EXPECT_EQ (0 , theNodeLBData ()->getLBData ()->node_subphase_comm_ .size ());
82
84
EXPECT_EQ (0 , theNodeLBData ()->getLBData ()->user_defined_json_ .size ());
83
85
EXPECT_EQ (0 , theNodeLBData ()->getLBData ()->user_defined_lb_info_ .size ());
86
+ EXPECT_EQ (0 , theNodeLBData ()->getLBData ()->node_user_attributes_ .size ());
84
87
#endif
85
88
}
86
89
87
90
struct TestCol : vt::Collection<TestCol,vt::Index1D> {
88
91
unsigned int prev_calls_ = thePhase()->getCurrentPhase ();
89
92
90
- TestCol () {
91
- // Insert dummy lb info data
92
- valInsert (" foo" , 10 , true , true , true );
93
- }
94
-
95
93
unsigned int prevCalls () { return prev_calls_++; }
96
94
97
- static void colHandler (TestCol* col) {
95
+ static void insertValue (TestCol* col) {
96
+ col->valInsert (" foo" , 10 , true , true , true );
97
+ }
98
98
99
+ static void colHandler (TestCol* col) {
99
100
auto & lb_data = col->lb_data_ ;
100
101
auto load_phase_count = lb_data.getLoadPhaseCount ();
101
102
auto comm_phase_count = lb_data.getCommPhaseCount ();
@@ -175,6 +176,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_last1) {
175
176
for (int i=0 ; i<num_phases; ++i) {
176
177
runInEpochCollective ([&]{
177
178
// Do some work.
179
+ proxy.broadcastCollective <TestCol::insertValue>();
178
180
proxy.broadcastCollective <TestCol::colHandler>();
179
181
});
180
182
// Go to the next phase.
@@ -214,6 +216,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_last2) {
214
216
for (int i=0 ; i<num_phases; ++i) {
215
217
runInEpochCollective ([&]{
216
218
// Do some work.
219
+ proxy.broadcastCollective <TestCol::insertValue>();
217
220
proxy.broadcastCollective <TestCol::colHandler>();
218
221
});
219
222
// Go to the next phase.
@@ -253,6 +256,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_last4) {
253
256
for (int i=0 ; i<num_phases; ++i) {
254
257
runInEpochCollective ([&]{
255
258
// Do some work.
259
+ proxy.broadcastCollective <TestCol::insertValue>();
256
260
proxy.broadcastCollective <TestCol::colHandler>();
257
261
});
258
262
// Go to the next phase.
@@ -295,6 +299,7 @@ TEST_F(TestLBDataRetention, test_lbdata_config_retention_higher) {
295
299
for (uint32_t i=0 ; i<theConfig ()->vt_lb_data_retention * 2 ; ++i) {
296
300
runInEpochCollective ([&]{
297
301
// Do some work.
302
+ proxy.broadcastCollective <TestCol::insertValue>();
298
303
proxy.broadcastCollective <TestCol::colHandler>();
299
304
});
300
305
// Go to the next phase.
@@ -336,6 +341,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_model_switch_1) {
336
341
for (uint32_t i=0 ; i<first_stage_num_phases; ++i) {
337
342
runInEpochCollective ([&]{
338
343
// Do some work.
344
+ proxy.broadcastCollective <TestCol::insertValue>();
339
345
proxy.broadcastCollective <TestCol::colHandler>();
340
346
});
341
347
// Go to the next phase.
@@ -354,6 +360,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_model_switch_1) {
354
360
for (uint32_t i=0 ; i<first_stage_num_phases; ++i) {
355
361
runInEpochCollective ([&]{
356
362
// Do some work.
363
+ proxy.broadcastCollective <TestCol::insertValue>();
357
364
proxy.broadcastCollective <TestCol::colHandler>();
358
365
});
359
366
// Go to the next phase.
@@ -393,6 +400,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_model_switch_2) {
393
400
for (uint32_t i=0 ; i<first_stage_num_phases; ++i) {
394
401
runInEpochCollective ([&]{
395
402
// Do some work.
403
+ proxy.broadcastCollective <TestCol::insertValue>();
396
404
proxy.broadcastCollective <TestCol::colHandler>();
397
405
});
398
406
// Go to the next phase.
@@ -416,6 +424,7 @@ TEST_F(TestLBDataRetention, test_lbdata_retention_model_switch_2) {
416
424
for (uint32_t i=0 ; i<10 ; ++i) {
417
425
runInEpochCollective ([&]{
418
426
// Do some work.
427
+ proxy.broadcastCollective <TestCol::insertValue>();
419
428
proxy.broadcastCollective <TestCol::colHandler>();
420
429
});
421
430
// Go to the next phase.
0 commit comments