Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

xgboost is compiled in local mode #31

Open
antonymayi opened this issue Sep 28, 2015 · 3 comments
Open

xgboost is compiled in local mode #31

antonymayi opened this issue Sep 28, 2015 · 3 comments

Comments

@antonymayi
Copy link
Contributor

Hi,

really struggling to compile xgboost for yarn with hdfs support. I can launch the yarn app but in the container logs it show:

terminate called after throwing an instance of 'std::runtime_error'
  what():  xgboost is compiled in local mode
to use hdfs, s3 or distributed version, compile with make dmlc=1

The libhdfs library on my system is placed as follows:

/usr/lib64/libhdfs.so
/usr/lib64/libhdfs.so.0.0.0
/usr/lib/hadoop/lib/native/libhdfs.a
/usr/include/hdfs.h

I tried building xgboost using these options:

make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib64 JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64 HADOOP_HDFS_HOME=/usr
make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib/hadoop/lib/native/ JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64 HADOOP_HDFS_HOME=/usr
make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib64 HDFS_INC_PATH=/usr/include JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64
make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib/hadoop/lib/native/ HDFS_INC_PATH=/usr/include JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64

But still no joy, keep getting the "xgboost is compiled in local mode".

Can you please advise?

Thanks,
Antony.

@antonymayi
Copy link
Contributor Author

ok, I managed to build it using:

make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib64 HDFS_INC_PATH=/usr/include JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64 dmlc=../dmlc-core/

however that makes it dependent on libglog so I had to hack repo/xgboost/Makefile:

 @@ -2,7 +2,7 @@ export CC  = $(if $(shell which gcc-5),gcc-5,gcc)
 export CXX = $(if $(shell which g++-5),g++-5,g++)
 export MPICXX = mpicxx
-export LDFLAGS= -pthread -lm
+export LDFLAGS= -pthread -lm -lglog -L../../deps/lib

This however now makes the yarn app dependent on lobglog.so I have to submit dmlc_yarn.py with -u deps/lib/libglog.so.0 which is bit dirty.

@antonymayi
Copy link
Contributor Author

so final method to get it all working without the libglog dependency:

cd repo/xgboost
git clone https://github.com/dmlc/dmlc-core
cd dmlc-core
make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib64 HDFS_INC_PATH=/usr/include JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64
cd ..
make USE_HDFS=1 HDFS_LIB_PATH=/usr/lib64 HDFS_INC_PATH=/usr/include JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64 dmlc=dmlc-core
cp xgboost ../../bin/xgboost.dmlc

this is rather a hack/workaround, it is not straightforward build process given the declared wormhole build config options.

@Kornel
Copy link

Kornel commented Nov 12, 2015

I'm having a similar issue, the tricks to tweak the build helped, however now I'm getting error like these:

Container: container_1447066627326_186565_01_000004 on s40819.dc4.local_8041
==============================================================================
LogType: stderr
LogLength: 130
Log Contents:
./xgboost.dmlc: error while loading shared libraries: libhdfs.so.0.0.0: cannot open shared object file: No such file or directory

LogType: stdout
LogLength: 0
Log Contents:

Well, the quick fix is to add libhdfs.so.0.0.0 using the -u option in dmlc_yarn.py .

Now my logs are clean

Container: container_1447066627326_186575_01_000028 on s40834.dc4.local_8041
==============================================================================
LogType: stderr
LogLength: 0
Log Contents:

LogType: stdout
LogLength: 0
Log Contents:

but the application still fails! I've attached the logs I've got from yarn logs -applicationId

Now I'm lost, hard to guess where to go from here. My guess is, something is wrong that I had to upload the libhdfs.so.0.0.0 file?

Any ideas?

logs.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants