From 7a92d4008ee429c0e208d198bc160a6220c1ba79 Mon Sep 17 00:00:00 2001 From: tqchen Date: Mon, 15 Jun 2015 09:24:10 -0700 Subject: [PATCH] fix col from dense --- src/io/simple_fmatrix-inl.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/io/simple_fmatrix-inl.hpp b/src/io/simple_fmatrix-inl.hpp index fc6aab8f9..af5b31321 100644 --- a/src/io/simple_fmatrix-inl.hpp +++ b/src/io/simple_fmatrix-inl.hpp @@ -153,7 +153,7 @@ class FMatrixS : public IFMatrix { pcol->Clear(); utils::ParallelGroupBuilder builder(&pcol->offset, &pcol->data); - builder.InitBudget(0, nthread); + builder.InitBudget(info_.num_col(), nthread); // start working iter_->BeforeFirst(); while (iter_->Next()) { @@ -204,7 +204,8 @@ class FMatrixS : public IFMatrix { } } - utils::Assert(pcol->Size() == info_.num_col(), "inconsistent col data"); + utils::Assert(pcol->Size() == info_.num_col(), + "inconsistent col data"); // sort columns bst_omp_uint ncol = static_cast(pcol->Size()); #pragma omp parallel for schedule(dynamic, 1) num_threads(nthread)