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

[R-package] [gpu] CMake-based build on Unix-like fails when providing custom OpenCL library #5960

Open
jameslamb opened this issue Jul 6, 2023 · 3 comments

Comments

@jameslamb
Copy link
Collaborator

Description and Reproducible Example

Running the following on not-Windows...

Rscript build_r.R \
    --use-gpu \
    --opencl-library=/usr/local/cuda/lib64/libOpenCL.so \
    --opencl-include-dir=/usr/local/cuda/include

Results in the following error

Error in source("install.libs.R", local = local.env) :
install.libs.R:143:77: unexpected string constant
142: # NOTE: build_r.R replaces the line below
143: command_line_args <- c('-DOpenCL_LIBRARY='/usr/local/cuda/lib64/libOpenCL.so''

That should be fixed.

Additional Comments

Created from #5950, see #5950 (comment) for more context.

This was caused by #5607, which tried to fix a similar problem (#5135) for the same process on Windows.

Such issues could be avoided in the future if this installation path was tested in CI: #3780.

@saashaspace
Copy link

Hey, is this issue still open or fixed because I couldn't find the code on line 142/143. Is it on line 109?

@jameslamb
Copy link
Collaborator Author

It is still open and unsolved. You can use the reproducible example in the issue description to reproduce the problem on a Unix-like operating system.

@michaelsch7
Copy link

michaelsch7 commented Aug 5, 2024

Hi, I am experiencing the same exact error running:

Rscript build_r.R \ --use-gpu \ --opencl-library=/usr/lib/x86_64-linux-gnu/libOpenCL.so \ --boost-librarydir=/usr/lib/x86_64-linux-gnu

on Ubuntu 22.04 with an AMD Radeon Pro GPU

Additionally, when I install just using:

Rscript build_r.R --use-gpu

The installation is successful, but the program freezes right before creating the gpu programs, so I figured I needed to pass the other flags when installing as mentioned above. Thanks!

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

3 participants