[UPDATE] Update rabit and threadlocal (#2114)

* [UPDATE] Update rabit and threadlocal

* minor fix to make build system happy

* upgrade requirement to g++4.8

* upgrade dmlc-core

* update travis
This commit is contained in:
Tianqi Chen
2017-03-16 18:48:37 -07:00
committed by GitHub
parent b0c972aa4d
commit d581a3d0e7
28 changed files with 59 additions and 48 deletions

View File

@@ -204,7 +204,7 @@ struct TrainParam : public dmlc::Parameter<TrainParam> {
/*! \brief maximum sketch size */
inline unsigned max_sketch_size() const {
unsigned ret = static_cast<unsigned>(sketch_ratio / sketch_eps);
CHECK_GT(ret, 0);
CHECK_GT(ret, 0U);
return ret;
}
};

View File

@@ -159,7 +159,7 @@ class ColMaker: public TreeUpdater {
}
unsigned n = static_cast<unsigned>(param.colsample_bytree * feat_index.size());
std::shuffle(feat_index.begin(), feat_index.end(), common::GlobalRandom());
CHECK_GT(n, 0)
CHECK_GT(n, 0U)
<< "colsample_bytree=" << param.colsample_bytree
<< " is too small that no feature can be included";
feat_index.resize(n);
@@ -628,7 +628,7 @@ class ColMaker: public TreeUpdater {
if (param.colsample_bylevel != 1.0f) {
std::shuffle(feat_set.begin(), feat_set.end(), common::GlobalRandom());
unsigned n = static_cast<unsigned>(param.colsample_bylevel * feat_index.size());
CHECK_GT(n, 0)
CHECK_GT(n, 0U)
<< "colsample_bylevel is too small that no feature can be included";
feat_set.resize(n);
}
@@ -784,7 +784,7 @@ class DistColMaker : public ColMaker<TStats, TConstraint> {
DMatrix* dmat,
const std::vector<RegTree*> &trees) override {
TStats::CheckInfo(dmat->info());
CHECK_EQ(trees.size(), 1) << "DistColMaker: only support one tree at a time";
CHECK_EQ(trees.size(), 1U) << "DistColMaker: only support one tree at a time";
// build the tree
builder.Update(gpair, dmat, trees[0]);
//// prune the tree, note that pruner will sync the tree

View File

@@ -283,7 +283,7 @@ class FastHistMaker: public TreeUpdater {
}
builder_.Init(this->nthread, nbins);
CHECK_EQ(info.root_index.size(), 0);
CHECK_EQ(info.root_index.size(), 0U);
std::vector<bst_uint>& row_indices = row_set_collection_.row_indices_;
// mark subsample and build list of member rows
if (param.subsample < 1.0f) {
@@ -313,7 +313,7 @@ class FastHistMaker: public TreeUpdater {
}
unsigned n = static_cast<unsigned>(param.colsample_bytree * feat_index.size());
std::shuffle(feat_index.begin(), feat_index.end(), common::GlobalRandom());
CHECK_GT(n, 0)
CHECK_GT(n, 0U)
<< "colsample_bytree=" << param.colsample_bytree
<< " is too small that no feature can be included";
feat_index.resize(n);
@@ -353,7 +353,7 @@ class FastHistMaker: public TreeUpdater {
}
}
}
CHECK_GT(min_nbins_per_feature, 0);
CHECK_GT(min_nbins_per_feature, 0U);
}
{
snode.reserve(256);

View File

@@ -55,7 +55,7 @@ class HistMaker: public BaseMaker {
const MetaInfo &info,
const bst_uint ridx) {
unsigned i = std::upper_bound(cut, cut + size, fv) - cut;
CHECK_NE(size, 0) << "try insert into size=0";
CHECK_NE(size, 0U) << "try insert into size=0";
CHECK_LT(i, size);
data[i].Add(gpair, info, ridx);
}
@@ -664,7 +664,7 @@ class GlobalProposalHistMaker: public CQHistMaker<TStats> {
cached_cut_.clear();
}
if (cached_rptr_.size() == 0) {
CHECK_EQ(this->qexpand.size(), 1);
CHECK_EQ(this->qexpand.size(), 1U);
CQHistMaker<TStats>::ResetPosAndPropose(gpair, p_fmat, fset, tree);
cached_rptr_ = this->wspace.rptr;
cached_cut_ = this->wspace.cut;

View File

@@ -257,7 +257,7 @@ class SketchMaker: public BaseMaker {
}
}
inline void SyncNodeStats(void) {
CHECK_NE(qexpand.size(), 0);
CHECK_NE(qexpand.size(), 0U);
std::vector<SKStats> tmp(qexpand.size());
for (size_t i = 0; i < qexpand.size(); ++i) {
tmp[i] = node_stats[qexpand[i]];