Skip to content

Commit e8a8b6b

Browse files
committed
Updated reduce_sum tutorial for cmdstanr threading interface chanes (Issue #175)
1 parent 1f9e74c commit e8a8b6b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

knitr/reduce-sum/reduce_sum_tutorial.Rmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Reduce Sum: A Minimal Example"
3-
date: "17 April 2020"
3+
date: "11 May 2020"
44
output: html_document
55
---
66

@@ -261,9 +261,12 @@ Save this as `logistic1.stan`.
261261
Compile this model with threading support:
262262

263263
```{r}
264-
logistic1 <- cmdstan_model("logistic1.stan", threads = TRUE)
264+
logistic1 <- cmdstan_model("logistic1.stan", cpp_options = list(stan_threads = TRUE))
265265
```
266266

267+
**Note:** If you get an error `Error in self$compile(...) : unused argument (cpp_options = list(stan_threads = TRUE))`, [update](https://mc-stan.org/cmdstanr/) your `cmdstanr` to the latest version (the threading interface was changed in May 2020, shortly after this tutorial was originally published).
268+
269+
267270
Set the number of threads each chain will use with `set_num_threads`:
268271

269272
```{r}

0 commit comments

Comments
 (0)