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

Within-chain parallelization in Ubuntu (WSL) not working. #1120

Open
qymera0 opened this issue Mar 7, 2024 · 0 comments
Open

Within-chain parallelization in Ubuntu (WSL) not working. #1120

qymera0 opened this issue Mar 7, 2024 · 0 comments

Comments

@qymera0
Copy link

qymera0 commented Mar 7, 2024

I have tried to fit a model with Within-chain parallelization using Ubuntu (through WSL) and am getting an error. The model normally works if I comment on the 'threads' argument. The model also works normally on Windows 10 (normally). Here is the model:

ccCicv <-
brm(
data = py$dfClean,
family = student,
cc ~ 1,
prior = c(
prior(normal(mean_y, sd_y * 5), class = Intercept),
prior(cauchy(0, sd_y), class = sigma),
prior(exponential(one_over_twentynine), class = nu)
),
stanvars = ccVars,
iter = 200000,
warmup = 4000,
chains = 4,
cores = 4,
seed = 123456,
thin = 100,
#control = list(adapt_delta = .90, max_treedepth = 15),
backend = "cmdstanr",
threads = threading(6)
)

Here is the error:

Error: Syntax error found! See the message above for more information.
7.
stop("Syntax error found! See the message above for more information.",
call. = FALSE)
6.
cmdstan_mod$format(canonicalize = list("deprecations", "braces",
"parentheses"), overwrite_file = overwrite_file, backup = FALSE)
5.
withVisible(...elt(i))
4.
utils::capture.output(cmdstan_mod$format(canonicalize = list("deprecations",
"braces", "parentheses"), overwrite_file = overwrite_file,
backup = FALSE))
3.
.canonicalize_stan_model(tmp_file, overwrite_file = FALSE)
2.
.make_stancode(bterms, data = data, prior = prior, stanvars = stanvars,
save_model = save_model, backend = backend, threads = threads,
opencl = opencl, normalize = normalize)
1.
brm(data = py$dfClean, family = student, cc ~ 1, prior = c(prior(normal(mean_y,
sd_y * 5), class = Intercept), prior(cauchy(0, sd_y), class = sigma),
prior(exponential(one_over_twentynine), class = nu)), stanvars = ccVars,
iter = 200000, warmup = 4000, chains = 4, seed = 123456, ...

BRMS version: 2.20.4
CMDSTANR version: 0.7.1
rstan version: 2.32.6
stanheaders version: 2.32.6

What I just did:

Updated the Linux;
Updated all packages from CRAN;
Installed RccpParallel from git-hub (current version: 5.1.7-9001);
Re-compiled the constant locally.

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

No branches or pull requests

1 participant