cmdstanr/OpenCL error

Hi, this isnt a mingw error. The issue is that on Windows, you need to additionally point to where the OpenCL lib is, if its not automatically found (which it seems it is not in your case).

Run the following R script, where you replace the path_to_opencl_lib to your path to the OpenCL.lib file:

path_to_opencl_lib <- "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.3/lib/x64"
cpp_options = list(
  paste0("LDFLAGS+= -L\"",path_to_opencl_lib,"\" -lOpenCL")
)

cmdstan_make_local(cpp_options = cpp_options)
rebuild_cmdstan(cores=4)

If you are using CUDA, the location should be in a simillar location (depending on the version).

We have an issue to mention this more prominently in the OpenCL vignette, but haven’t gotten to this unfortunately :/

3 Likes