Hi!
I was trying to run the example Open CL /cmdstanr (https://mc-stan.org/cmdstanr/articles/opencl.html, but ran into an error:
Code:
library(cmdstanr)
# Generate some fake data
n <- 250000
k <- 20
X <- matrix(rnorm(n * k), ncol = k)
y <- rbinom(n, size = 1, prob = plogis(3 * X[,1] - 2 * X[,2] + 1))
mdata <- list(k = k, n = n, y = y, X = X)
# Compile the model with STAN_OPENCL=TRUE
mod_cl <- cmdstan_model("open_cl/simple_model.stan",
cpp_options = list(stan_opencl = TRUE))
Error:
Compiling Stan program...
In file included from stan/src/stan/model/model_header.hpp:18:
stan/src/stan/services/util/create_rng.hpp:35:1: internal compiler error: in gt_pch_note_object, at ggc-common.c:276
} // namespace stan
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/r-windows> for instructions.
mingw32-make.exe: *** [make/program:25: stan/src/stan/model/model_header_opencl.hpp.gch] Error 1
Error: An error occured during compilation! See the message above for more information.
I can compile regular (non Open CL) Stan programs without problem. I have tried reinstalling cmdstan, as well as rebuilding the cmdstan installation as per the advice in this thread https://discourse.mc-stan.org/t/opencl-cmdstanr-windows-error/22375/3 .
Happy for any suggestions for how to fix this!
Operating System: Win 10 x64 (build 19043)
Interface Version: R 4.1.0 cmdstanr_0.4.0 cmdstan 2.27.0
Compiler/Toolkit: RTools 4.0
$ make -v
GNU Make 4.2.1
Built for x86_64-pc-msys