Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling gpu version on ppc64le #1905

Closed
ironv opened this issue Dec 14, 2018 · 4 comments
Closed

compiling gpu version on ppc64le #1905

ironv opened this issue Dec 14, 2018 · 4 comments

Comments

@ironv
Copy link

ironv commented Dec 14, 2018

Hi -- I am trying to compile LightGBM (latest version pulled using git) on a ppc64le machine running Ubuntu 18.04.1 LTS. The CPU version compiles and runs perfectly and is being used with Python. I am running into some issues when compiling the GPU version (box has nvidia P100s).

root@3b34b44ac424:/home/myusername/LightGBM/build# cmake -DUSE_GPU=1 ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - found
-- Found OpenCL: /usr/lib/powerpc64le-linux-gnu/libOpenCL.so (found version "2.2")
-- OpenCL include directory:/usr/include
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   filesystem
--   system
-- Configuring done
-- Generating done
-- Build files have been written to: /home/myusername/LightGBM/build

When I try to build

root@3b34b44ac424:/home/myusername/LightGBM/build# make -j$(nproc)
Scanning dependencies of target lightgbm
Scanning dependencies of target _lightgbm
[  1%] Building CXX object CMakeFiles/lightgbm.dir/src/main.cpp.o
[  4%] Building CXX object CMakeFiles/lightgbm.dir/src/boosting/gbdt_prediction.cpp.o
[  4%] Building CXX object CMakeFiles/lightgbm.dir/src/io/tree.cpp.o
[  6%] Building CXX object CMakeFiles/lightgbm.dir/src/application/application.cpp.o
[  7%] Building CXX object CMakeFiles/lightgbm.dir/src/io/json11.cpp.o

...............snip.....................................................

[ 92%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/json11.cpp.o
[ 93%] Building CXX object CMakeFiles/_lightgbm.dir/src/network/network.cpp.o
[ 95%] Building CXX object CMakeFiles/lightgbm.dir/src/treelearner/serial_tree_learner.cpp.o
[ 96%] Building CXX object CMakeFiles/lightgbm.dir/src/treelearner/tree_learner.cpp.o
In file included from /usr/include/boost/mpl/aux_/integral_wrapper.hpp:22:0,
                 from /usr/include/boost/mpl/int.hpp:20,
                 from /usr/include/boost/mpl/lambda_fwd.hpp:23,
                 from /usr/include/boost/mpl/aux_/na_spec.hpp:18,
                 from /usr/include/boost/mpl/identity.hpp:17,
                 from /usr/include/boost/iterator/detail/enable_if.hpp:11,
                 from /usr/include/boost/iterator/transform_iterator.hpp:11,
                 from /usr/include/boost/algorithm/string/iter_find.hpp:17,
                 from /usr/include/boost/algorithm/string/split.hpp:16,
                 from /home/myusername/LightGBM/compute/include/boost/compute/device.hpp:18,
                 from /home/myusername/LightGBM/compute/include/boost/compute/context.hpp:19,
                 from /home/myusername/LightGBM/compute/include/boost/compute/buffer.hpp:15,
                 from /home/myusername/LightGBM/compute/include/boost/compute/core.hpp:18,
                 from /home/myusername/LightGBM/src/treelearner/gpu_tree_learner.h:27,
                 from /home/myusername/LightGBM/src/treelearner/tree_learner.cpp:4:
/usr/include/boost/mpl/vector.hpp:36:49: error: pasting ")" and "20" does not give a valid preprocessing token
 #   include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER)
                                                 ^
In file included from /usr/include/boost/math/policies/policy.hpp:14:0,
                 from /usr/include/boost/math/special_functions/math_fwd.hpp:29,
                 from /usr/include/boost/math/special_functions/sign.hpp:17,
                 from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:34,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:63,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:54,
                 from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:42,
                 from /usr/include/boost/lexical_cast.hpp:32,
                 from /home/myusername/LightGBM/compute/include/boost/compute/detail/meta_kernel.hpp:23,
                 from /home/myusername/LightGBM/compute/include/boost/compute/iterator/buffer_iterator.hpp:26,
                 from /home/myusername/LightGBM/compute/include/boost/compute/algorithm/detail/copy_on_device.hpp:18,
                 from /home/myusername/LightGBM/compute/include/boost/compute/algorithm/copy.hpp:26,
                 from /home/myusername/LightGBM/compute/include/boost/compute/container/vector.hpp:32,
                 from /home/myusername/LightGBM/src/treelearner/gpu_tree_learner.h:28,
                 from /home/myusername/LightGBM/src/treelearner/tree_learner.cpp:4:
/usr/include/boost/mpl/vector.hpp:36:1: fatal error: boost/mpl/__attribute__((altivec(vector__)))/__attribute__((altivec(vector__)))20.hpp: No such file or directory
 #   include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER)
 ^
compilation terminated.
CMakeFiles/_lightgbm.dir/build.make:758: recipe for target 'CMakeFiles/_lightgbm.dir/src/treelearner/tree_learner.cpp.o' failed
make[2]: *** [CMakeFiles/_lightgbm.dir/src/treelearner/tree_learner.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

...............snip.....................................................
.....above error is repeated several times..............................


compilation terminated.
CMakeFiles/lightgbm.dir/build.make:686: recipe for target 'CMakeFiles/lightgbm.dir/src/treelearner/gpu_tree_learner.cpp.o' failed
make[2]: *** [CMakeFiles/lightgbm.dir/src/treelearner/gpu_tree_learner.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/lightgbm.dir/all' failed
make[1]: *** [CMakeFiles/lightgbm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/_lightgbm.dir/all' failed
make[1]: *** [CMakeFiles/_lightgbm.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

I would really appreciate any help with this. Thx.

@StrikerRUS
Copy link
Collaborator

I think that we do not officially support PPC64LE. Maybe @huanzhang12 can help.

@huanzhang12
Copy link
Contributor

huanzhang12 commented Jan 6, 2019

This seems to related to a libboost issue with altivec on ppc64le.
First of all I would suggest using the latest libboost and recompile.
I don't have any ppc64le machines so cannot verify, but you can try to disable altivec instruction set in compiler (something like -mno-altivec) and see if that changes anything. But it will certainly reduce performance.
If you can reproduce this error with some minimal examples, it is better to submit a bug report to libboost.

@StrikerRUS
Copy link
Collaborator

I think this issue can be closed as a sub-issue of #1129.

@sh1ng
Copy link
Contributor

sh1ng commented Feb 22, 2019

@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
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

4 participants