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

[GPU] [AMD] [R-package] Trying to install. #6876

Closed
nipnipj opened this issue Mar 27, 2025 · 5 comments
Closed

[GPU] [AMD] [R-package] Trying to install. #6876

nipnipj opened this issue Mar 27, 2025 · 5 comments

Comments

@nipnipj
Copy link

nipnipj commented Mar 27, 2025

Trying to install with Rscript build_r.R --use-gpu --no-build-vignettes results in

[ 67%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/treelearner/data_parallel_tree_learner.cpp.o
In file included from /usr/include/CL/cl.h:20,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/cl.hpp:19,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/config.hpp:16,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/buffer.hpp:14,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/core.hpp:18,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/src/treelearner/gpu_tree_learner.h:33,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/src/treelearner/parallel_tree_learner.h:15,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/src/treelearner/data_parallel_tree_learner.cpp:9:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
In file included from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/program.hpp:35,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/kernel.hpp:24,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/memory_object.hpp:16,
                 from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/buffer.hpp:17:
/tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/detail/sha1.hpp: In member function ‘boost::compute::detail::sha1::operator std::string()’:
/tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/detail/sha1.hpp:41:26: error: cannot convert ‘unsigned int [5]’ to ‘unsigned char (&)[20]’
   41 |             h.get_digest(digest);
      |                          ^~~~~~
      |                          |
      |                          unsigned int [5]
In file included from /tmp/RtmpZ97d0s/R.INSTALL4fba378ec539/lightgbm/src/external_libs/compute/include/boost/compute/detail/sha1.hpp:18:
/usr/include/boost/uuid/detail/sha1.hpp:179:43: note:   initializing argument 1 of ‘void boost::uuids::detail::sha1::get_digest(unsigned char (&)[20])’
  179 | inline void sha1::get_digest(digest_type& digest)
      |                              ~~~~~~~~~~~~~^~~~~~
make[3]: *** [CMakeFiles/lightgbm_objs.dir/build.make:415: CMakeFiles/lightgbm_objs.dir/src/treelearner/data_parallel_tree_learner.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:93: CMakeFiles/lightgbm_objs.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:165: CMakeFiles/_lightgbm.dir/rule] Error 2
make: *** [Makefile:195: _lightgbm] Error 2
Error in .run_shell_command(build_cmd, build_args) : 
  Command failed with exit code: 2
* removing ‘/home/cuysaurus/R/x86_64-pc-linux-gnu-library/4.4/lightgbm’
Error in .run_shell_command(install_cmd, install_args) : 
  Command failed with exit code: 1
Execution halted
@jameslamb
Copy link
Collaborator

Thanks for using LightGBM.

Please, give us enough information to help you.

  • operating system?
  • version / commit hash of LightGBM?
  • version of R?
  • full logs from CMake (not only the error message)?

1 command and 1 error message is not enough information for us to reproduce this and help you.

@nipnipj
Copy link
Author

nipnipj commented Mar 27, 2025

* operating system?

CachyOS x86_64. Linux 6.14.0-3-cachyos

* version / commit hash of LightGBM?

git clone --recursive https://github.com/microsoft/LightGBM

* version of R?

4.4

* full logs from CMake (not only the error message)?

1 command and 1 error message is not enough information for us to reproduce this and help you.

just used

git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
Rscript build_r.R --use-gpu --no-build-vignettes

Which are enough, at least the last time I used a Nvidia gpu, a few months ago.

@jameslamb
Copy link
Collaborator

Thanks, but I asked for the full logs from CMake, please. This will have valuable information like which compiler was found.

@nipnipj
Copy link
Author

nipnipj commented Mar 27, 2025

Thanks, but I asked for the full logs from CMake, please. This will have valuable information like which compiler was found.

 Rscript build_r.R --use-gpu --no-build-vignettes

* checking for file ‘/home/cuysaurus/LightGBM/lightgbm_r/DESCRIPTION’ ... OK
* preparing ‘lightgbm’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
WARNING: directory ‘lightgbm/src/external_libs/compute/test’ is empty
* looking to see if a ‘data/datalist’ file should be added
* building ‘lightgbm_4.6.0.99.tar.gz’
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
  storing paths of more than 100 bytes is not portable:
  ‘lightgbm/src/external_libs/compute/include/boost/compute/algorithm/detail/find_extrema_with_atomics.hpp’
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
  storing paths of more than 100 bytes is not portable:
  ‘lightgbm/src/external_libs/compute/include/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp’
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
  storing paths of more than 100 bytes is not portable:
  ‘lightgbm/src/external_libs/compute/include/boost/compute/algorithm/detail/reduce_by_key_with_scan.hpp’
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
  storing paths of more than 100 bytes is not portable:
  ‘lightgbm/src/external_libs/compute/include/boost/compute/iterator/detail/get_base_iterator_buffer.hpp’

* installing to library ‘/home/cuysaurus/R/x86_64-pc-linux-gnu-library/4.4’
* installing *source* package ‘lightgbm’ ...
** using staged installation
** libs
installing via 'install.libs.R' to /home/cuysaurus/R/x86_64-pc-linux-gnu-library/4.4/00LOCK-lightgbm/00new/lightgbm
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- R version passed into FindLibR.cmake: 4.4.3
-- Found LibR: /usr/lib/R
-- LIBR_EXECUTABLE: /usr/bin/R
-- LIBR_INCLUDE_DIRS: /usr/include/R
-- LIBR_LIBS_DIR: /usr/lib/R/lib
-- LIBR_CORE_LIBRARY: /usr/lib/R/lib/libR.so
-- 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_3_0
-- Looking for CL_VERSION_3_0 - found
-- Found OpenCL: /usr/lib/libOpenCL.so (found version "3.0")
-- OpenCL include directory: /usr/include
CMake Warning (dev) at CMakeLists.txt:196 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found suitable version "1.87.0", minimum required is "1.56.0") found components: filesystem system
-- Performing Test MM_PREFETCH
-- Performing Test MM_PREFETCH - Success
-- Using _mm_prefetch
-- Performing Test MM_MALLOC
-- Performing Test MM_MALLOC - Success
-- Using _mm_malloc
-- Configuring done (1.2s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/build
Building lightgbm.so
[  2%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/boosting.cpp.o
[  5%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_model_text.cpp.o
[  8%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_prediction.cpp.o
[ 10%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt.cpp.o
[ 13%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/prediction_early_stop.cpp.o
[ 16%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/sample_strategy.cpp.o
[ 18%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/bin.cpp.o
[ 21%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/config_auto.cpp.o
[ 24%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/config.cpp.o
[ 27%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/dataset_loader.cpp.o
[ 29%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/dataset.cpp.o
[ 32%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/file_io.cpp.o
[ 35%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/json11.cpp.o
[ 37%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/metadata.cpp.o
[ 40%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/parser.cpp.o
[ 43%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/train_share_states.cpp.o
[ 45%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/tree.cpp.o
[ 48%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/metric/dcg_calculator.cpp.o
[ 51%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/metric/metric.cpp.o
[ 54%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linker_topo.cpp.o
[ 56%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linkers_mpi.cpp.o
[ 59%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linkers_socket.cpp.o
[ 62%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/network.cpp.o
[ 64%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/objective/objective_function.cpp.o
[ 67%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/treelearner/data_parallel_tree_learner.cpp.o
In file included from /usr/include/CL/cl.h:20,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/cl.hpp:19,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/config.hpp:16,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/buffer.hpp:14,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/core.hpp:18,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/src/treelearner/gpu_tree_learner.h:33,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/src/treelearner/parallel_tree_learner.h:15,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/src/treelearner/data_parallel_tree_learner.cpp:9:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
In file included from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/program.hpp:35,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/kernel.hpp:24,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/memory_object.hpp:16,
                 from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/buffer.hpp:17:
/tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/detail/sha1.hpp: In member function ‘boost::compute::detail::sha1::operator std::string()’:
/tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/detail/sha1.hpp:41:26: error: cannot convert ‘unsigned int [5]’ to ‘unsigned char (&)[20]’
   41 |             h.get_digest(digest);
      |                          ^~~~~~
      |                          |
      |                          unsigned int [5]
In file included from /tmp/RtmpCzN20o/R.INSTALL785b63b85492/lightgbm/src/external_libs/compute/include/boost/compute/detail/sha1.hpp:18:
/usr/include/boost/uuid/detail/sha1.hpp:179:43: note:   initializing argument 1 of ‘void boost::uuids::detail::sha1::get_digest(unsigned char (&)[20])’
  179 | inline void sha1::get_digest(digest_type& digest)
      |                              ~~~~~~~~~~~~~^~~~~~
make[3]: *** [CMakeFiles/lightgbm_objs.dir/build.make:415: CMakeFiles/lightgbm_objs.dir/src/treelearner/data_parallel_tree_learner.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:93: CMakeFiles/lightgbm_objs.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:165: CMakeFiles/_lightgbm.dir/rule] Error 2
make: *** [Makefile:195: _lightgbm] Error 2
Error in .run_shell_command(build_cmd, build_args) : 
  Command failed with exit code: 2
* removing ‘/home/cuysaurus/R/x86_64-pc-linux-gnu-library/4.4/lightgbm’
Error in .run_shell_command(install_cmd, install_args) : 
  Command failed with exit code: 1
Execution halted

~/LightGBM master 1m 24s

Is this the required info?

@jameslamb
Copy link
Collaborator

Great, thank you! Yes, now we have enough to start investigating this.

I think the key line there is this:

-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found suitable version "1.87.0", minimum required is "1.56.0") found components: filesystem system

LightGBM's GPU version does not currently support Boost 1.87. We've seen similar compilation errors pointing to that exact same Boost source before.

In fact, I found searching today that you yourself already reported the exact same thing 2 months ago: #6786 (comment)

I'm going to close this issue, let's please keep the conversation over in #6786 since it appears to be the exact same thing. Splitting the conversation across multiple issues increases the effort for everyone involved.

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

No branches or pull requests

2 participants