minor change
This commit is contained in:
parent
532575b752
commit
478d250818
@ -116,7 +116,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// at this point, the model object should allow us to recover the program state
|
// at this point, the model object should allow us to recover the program state
|
||||||
...
|
...
|
||||||
// each iteration can contain multiple calls of allreduce/broadcast
|
// each iteration can contain multiple calls of allreduce/broadcast
|
||||||
rabit::Allreduce(&data[0], n);
|
rabit::Allreduce<rabit::op::Max>(&data[0], n);
|
||||||
...
|
...
|
||||||
// checkpoint model after one iteration finishes
|
// checkpoint model after one iteration finishes
|
||||||
rabit::CheckPoint(&model);
|
rabit::CheckPoint(&model);
|
||||||
|
|||||||
@ -21,4 +21,3 @@ print '@node[%d] before-allreduce: a=%s' % (rank, str(a))
|
|||||||
a = rabit.allreduce(a, rabit.MAX)
|
a = rabit.allreduce(a, rabit.MAX)
|
||||||
print '@node[%d] after-allreduce: a=%s' % (rank, str(a))
|
print '@node[%d] after-allreduce: a=%s' % (rank, str(a))
|
||||||
rabit.finalize()
|
rabit.finalize()
|
||||||
|
|
||||||
|
|||||||
@ -20,4 +20,3 @@ s = rabit.broadcast(s, 0)
|
|||||||
|
|
||||||
print '@node[%d] after-broadcast: s=\"%s\"' % (rank, str(s))
|
print '@node[%d] after-broadcast: s=\"%s\"' % (rank, str(s))
|
||||||
rabit.finalize()
|
rabit.finalize()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user