diff --git a/python/README.md b/python/README.md index cf59ba9ab..4aceb7d5e 100644 --- a/python/README.md +++ b/python/README.md @@ -3,3 +3,4 @@ python wrapper for xgboost using ctypes see example for usage to make the python module, type make in the root directory of project + diff --git a/src/tree/updater_colmaker-inl.hpp b/src/tree/updater_colmaker-inl.hpp index eb5ff85fc..3645e53ce 100644 --- a/src/tree/updater_colmaker-inl.hpp +++ b/src/tree/updater_colmaker-inl.hpp @@ -271,7 +271,8 @@ class ColMaker: public IUpdater { } // start enumeration const unsigned nsize = static_cast(feat_set.size()); - #pragma omp parallel for schedule(dynamic, 1) + const int batch_size = std::max(static_cast(nsize / this->nthread / 32), 1); + #pragma omp parallel for schedule(dynamic, batch_size) for (unsigned i = 0; i < nsize; ++i) { const unsigned fid = feat_set[i]; const int tid = omp_get_thread_num();