0

I am attempting to compile xgboost with GPU support on windows 10 for RStudio following here. I have successfully completed all steps except the final one.

I receive the following error:

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake --build . --target install --config Release
Error: could not load cache

Attempting to follow this response here, I have checked for free disk space. Using Windows Explorer I see that I have 75 of 166 GB free on Windows (C:) I have also attempted the following command, but I do now know what CLion is and I assume I am not using it.

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ File---"Reload CMake Project"
bash: File---Reload CMake Project: command not found

Any suggestions would be greatly appreciated.

Edit to add: Here is my full session of commands in the Bash session for clarification.

billp@DESKTOP-63F9UDC MINGW64 ~
$ git clone https://github.com/dmlc/xgboost
fatal: destination path 'xgboost' already exists and is not an empty directory.

billp@DESKTOP-63F9UDC MINGW64 ~
$ cd xgboost

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost (master)
$ git submodule init
gi
billp@DESKTOP-63F9UDC MINGW64 ~/xgboost (master)
$ git submodule update

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost (master)
$ cd R-package

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package (master)
$ R CMD INSTALL .
* installing to library 'C:/Program Files/R/R-4.0.2/library'
Error: ERROR: no permission to install to directory 'C:/Program Files/R/R-4.0.2/library'

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package (master)
$ mkdir build
mkdir: cannot create directory ‘build’: File exists

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package (master)
$ cd build

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake .. -G"Visual Studio 16 2019" -DUSE_CUDA=ON -DR_LIB=ON -DLIBR_EXECUTABLE="C:/Program Files/R/R-4.0.2/bin/x64/R.exe"
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- CMake version 3.18.0
-- xgboost VERSION: 1.2.0
-- Configured CUDA host compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
-- CUDA GEN_CODE: --generate-code=arch=compute_35,code=sm_35;--generate-code=arch=compute_50,code=sm_50;--generate-code=arch=compute_52,code=sm_52;--generate-code=arch=compute_60,code=sm_60;--generate-code=arch=compute_61,code=sm_61;--generate-code=arch=compute_70,code=sm_70;--generate-code=arch=compute_75,code=sm_75;--generate-code=arch=compute_75,code=compute_75;
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- C:/Users/billp/xgboost/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h
DMLC_ROOT point to C:/Users/billp/xgboost/rabit/../dmlc-core
-- LIBR_HOME [C:/Program Files/R/R-4.0.2]
-- LIBR_EXECUTABLE [C:/Program Files/R/R-4.0.2/bin/x64/R.exe]
-- LIBR_INCLUDE_DIRS [C:/Program Files/R/R-4.0.2/include]
-- LIBR_LIB_DIR [C:/Program Files/R/R-4.0.2/bin/x64]
-- LIBR_CORE_LIBRARY [C:/Users/billp/xgboost/R-package/R-package/R.lib]
-- Found R: C:/Program Files/R/R-4.0.2/bin/x64/R.exe
-- LIBR_CORE_LIBRARY C:/Users/billp/xgboost/R-package/R-package/R.lib
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "runxgboost".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "xgboost".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "objxgboost".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in dmlc-core/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "dmlc".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in rabit/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "rabit".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in R-package/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "xgboost-r".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: C:/Users/billp/xgboost/R-package

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake --build . --target install --config Release
Error: could not load cache

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake --build . --target install --config Release -DLIBR_HOME="C:\Program Files\R\R-4.0.2"
Unknown argument -DLIBR_HOME=C:\Program Files\R\R-4.0.2
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  --parallel [<jobs>], -j [<jobs>]
                 = Build in parallel using the given number of jobs.
                   If <jobs> is omitted the native build tool's
                   default number is used.
                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                   specifies a default parallel level when this option
                   is not given.
  --target <tgt>..., -t <tgt>...
                 = Build <tgt> instead of default targets.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --verbose, -v  = Enable verbose output - if supported - including
                   the build commands to be executed.
  --             = Pass remaining options to the native tool.
baprisbrey
  • 43
  • 7
  • I thought I had this solved by by moving up a folder above the "build" folder. In other words, I ran: "billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package $ cmake --build . --target install --config Release" I thought this worked but an hour later it is still running and is stuck on "R-package-install/R-package-install" over and over. I think I'll toggle the "Path" because I use Rtools40, not Rtools – baprisbrey Jul 22 '20 at 04:43
  • I adjusted the PATH but it didn't help. – baprisbrey Jul 22 '20 at 04:54
  • Do you have `CMakeCache.txt` file in the directory, where you run `cmake --build . <...>` command? Note, you should run this command from the same directory where you previously run `cmake` for configure the project. See also [that question](https://stackoverflow.com/questions/16319292/cmake-error-could-not-load-cache) for troubleshooting. – Tsyvarev Jul 22 '20 at 08:32
  • The following command shows nothing in the build directory: billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master) $ dir [completely blank.] – baprisbrey Jul 22 '20 at 19:31
  • According to the [question](https://stackoverflow.com/questions/52307360/r-xgboost-how-to-compile-xgboost-with-gpu-support-on-windows-10) you refer to, before `cmake --build . --target install --config Release` you need to run `cmake .. -G"Visual Studio 14 2015 Win64" -DUSE_CUDA=ON -DR_LIB=ON -DLIBR_EXECUTABLE="C:/Program Files/R/R-3.4.1/bin/x64/R.exe"`. – Tsyvarev Jul 22 '20 at 20:25
  • I have added the full session for clarification. Before the install --config Release command (that produces the cache error) I run the line that you have pointed out. – baprisbrey Jul 23 '20 at 04:54
  • Note on this line: `Build files have been written to: C:/Users/billp/xgboost/R-package`. Build files has been written not into the directory where you call `cmake`, but into the source directory. CMake works that way when it detects **in-source** build has already be performed: in that case CMake **ignores** any build directory specified for it and performs configuration directly in the source directory. For get ability of **out-of-source** builds, you need to remove generated `CMakeCache.txt` (not `CMakeLists.txt`!!) from the source directory. – Tsyvarev Jul 23 '20 at 07:51
  • I believe this answers my question -- thank you so much for help! I don't know how you can keep track of all these things, it's incredible! – baprisbrey Jul 23 '20 at 17:22

0 Answers0