Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rabit harden] fix rabit tests #81

Merged
merged 20 commits into from
Mar 14, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
per feedback
  • Loading branch information
Chen Qin committed Mar 8, 2019
commit db66de615af1fa2b8439195cf1e43f58b26b8323
7 changes: 1 addition & 6 deletions test/model_recover.cc
Original file line number Diff line number Diff line change
@@ -100,28 +100,23 @@ int main(int argc, char *argv[]) {
for (int i = 1; i < argc; ++i) {
int n;
if (sscanf(argv[i], "rabit_num_trial=%d", &n) == 1) ntrial = n;

}
int iter = rabit::LoadCheckPoint(&model);
if (iter == 0) {
model.InitModel(n);
}
printf("[%d] reload-trail=%d, init iter=%d\n", rank, ntrial, iter);

for (int r = iter; r < 3; ++r) {
TestMax(&model, ntrial, r);
printf("[%d] !!!TestMax pass, iter=%d\n", rank, r);

int step = std::max(nproc / 3, 1);
for (int i = 0; i < nproc; i += step) {
TestBcast(n, i, ntrial, r);
}
printf("[%d] !!!TestBcast pass, iter=%d\n", rank, r);


TestSum(&model, ntrial, r);
printf("[%d] !!!TestSum pass, iter=%d\n", rank, r);


rabit::CheckPoint(&model);
printf("[%d] !!!Checkpoint pass, iter=%d\n", rank, r);
}
2 changes: 1 addition & 1 deletion test/test.mk
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ all: model_recover_10_10k model_recover_10_10k_die_same model_recover_10_10k_di

# this experiment test recovery with actually process exit, use keepalive to keep program alive
model_recover_10_10k:
../dmlc-core/tracker/dmlc-submit --cluster local --num-workers=2 model_recover 10000 mock=0,0,1,0 mock=1,1,1,0 rabit_num_trial=0 DMLC_NUM_ATTEMPT=10
../dmlc-core/tracker/dmlc-submit --cluster local --num-workers=10 model_recover 10000 mock=0,0,1,0 mock=1,1,1,0 rabit_num_trial=0 DMLC_NUM_ATTEMPT=10

model_recover_10_10k_die_same:
../dmlc-core/tracker/dmlc-submit --cluster local --num-workers=10 model_recover 10000 mock=0,0,1,0 mock=1,1,1,0 mock=0,1,1,0 mock=4,1,1,0 mock=9,1,1,0 rabit_num_trial=0 DMLC_NUM_ATTEMPT=10