minmum fix

This commit is contained in:
tqchen
2015-03-21 00:25:16 -07:00
parent 8b3c435241
commit e3c76bfafb
5 changed files with 16 additions and 36 deletions

View File

@@ -18,4 +18,4 @@ linear.o: linear.cc ../../src/*.h linear.h ../solver/*.h
# dependenies here
linear.rabit: linear.o lib
linear.mock: linear.o lib
test.rabit: test_load.cc lib

View File

@@ -1,33 +0,0 @@
#include <rabit.h>
#include "../io/io.h"
int main(int argc, char *argv[]) {
using namespace rabit::io;
if (argc < 4) {
// intialize rabit engine
rabit::Init(argc, argv);
if (rabit::GetRank() == 0) {
rabit::TrackerPrintf("Usage: <data_in> npart rank\n");
}
rabit::Finalize();
return 0;
}
rabit::Init(argc, argv);
int n = 0;
InputSplit *in = CreateInputSplit(argv[1],
atoi(argv[2]),
atoi(argv[3]));
std::string line;
while (in->NextLine(&line)) {
if (n % 100 == 0) {
rabit::TrackerPrintf("[%d] finishes loading %d lines\n",
rabit::GetRank(), n);
}
n++;
}
delete in;
rabit::TrackerPrintf("[%d] ALL finishes loading %d lines\n",
rabit::GetRank(), n);
rabit::Finalize();
return 0;
}