# Cmdstanr reduce sum case study, but: unused argument (threads = TRUE)

**URL:** <https://discourse.mc-stan.org/t/cmdstanr-reduce-sum-case-study-but-unused-argument-threads-true/15105>\
**Category:** Interfaces\
**Tags:** cmdstanr\
**Created:** [May 13, 2020, 7:13pm UTC](https://discourse.mc-stan.org/t/cmdstanr-reduce-sum-case-study-but-unused-argument-threads-true/15105 "2020-05-13T19:13:17Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![shira](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/shira/32/14161_2.png) [@shira](https://discourse.mc-stan.org/u/shira)\
**Post date:** [May 16, 2020, 3:36pm UTC](https://discourse.mc-stan.org/t/cmdstanr-reduce-sum-case-study-but-unused-argument-threads-true/15105/5 "2020-05-16T15:36:24Z")

</div>

Since I can’t get any speed-up in CmdStanR, it might it be worth trying to replicate the case study in regular CmdStan instead ?

I followed [Getting Started with CmdStan](https://github.com/stan-dev/cmdstan/wiki/Getting-Started-with-CmdStan), used `stan_rdump(names(redcard_data), "redcard.data.R")` in RStudio, and then in the terminal:

```
make ~/Documents/logistic0
make ~/Documents/logistic1
~/Documents/logistic0 sample data file=~/Documents/redcard.data.R
~/Documents/logistic1 sample data file=~/Documents/redcard.data.R

```

These compile and sample. But how do I modify to set cores and threads, following the [Reduce Sum: A Minimal Example](https://mc-stan.org/users/documentation/case-studies/reduce_sum_tutorial.html) case study ? How can I time things ?

---

_[View the full topic](https://discourse.mc-stan.org/t/cmdstanr-reduce-sum-case-study-but-unused-argument-threads-true/15105)._
