From d45fca0298b5350416fecfd7db06b221a63577e2 Mon Sep 17 00:00:00 2001 From: tqchen Date: Sat, 27 Feb 2016 18:10:58 -0800 Subject: [PATCH] fix build --- guide/lazy_allreduce.py | 12 ++++++------ include/rabit/rabit.h | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/guide/lazy_allreduce.py b/guide/lazy_allreduce.py index a195f58d2..2b60a8cf4 100755 --- a/guide/lazy_allreduce.py +++ b/guide/lazy_allreduce.py @@ -18,14 +18,14 @@ rank = rabit.get_rank() a = np.zeros(n) def prepare(a): - print '@node[%d] run prepare function' % rank + print('@node[%d] run prepare function' % rank) # must take in reference and modify the reference for i in xrange(n): - a[i] = rank + i - -print '@node[%d] before-allreduce: a=%s' % (rank, str(a)) + a[i] = rank + i + +print('@node[%d] before-allreduce: a=%s' % (rank, str(a))) a = rabit.allreduce(a, rabit.MAX, prepare_fun = prepare) -print '@node[%d] after-allreduce-max: a=%s' % (rank, str(a)) +print('@node[%d] after-allreduce-max: a=%s' % (rank, str(a))) a = rabit.allreduce(a, rabit.SUM) -print '@node[%d] after-allreduce-sum: a=%s' % (rank, str(a)) +print('@node[%d] after-allreduce-sum: a=%s' % (rank, str(a))) rabit.finalize() diff --git a/include/rabit/rabit.h b/include/rabit/rabit.h index 70660eafe..cf79bd638 100644 --- a/include/rabit/rabit.h +++ b/include/rabit/rabit.h @@ -347,6 +347,5 @@ class SerializeReducer { }; } // namespace rabit // implementation of template functions -#include "./internal/ -rabit-inl.h" +#include "./internal/rabit-inl.h" #endif // RABIT_RABIT_H_ // NOLINT(*)