# \#compiler

**URL:** https://discourse.mc-stan.org/tag/compiler/61.md?match_all_tags=true&page=1&tags%5B%5D=compiler

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

**Page:** 2

---

## [Compilation error on macOS Monterey; "error: no member named 'strtoul' in the global namespaceusing", "Error in sink(type = "output") : invalid connection"](https://discourse.mc-stan.org/t/compilation-error-on-macos-monterey-error-no-member-named-strtoul-in-the-global-namespaceusing-error-in-sink-type-output-invalid-connection/29294)

<div class="topic-metadata">

**Author:** [@MadelineJC](https://discourse.mc-stan.org/u/MadelineJC)\
**Replies:** 2\
**Last updated:** [November 1, 2022, 7:09pm UTC](https://discourse.mc-stan.org/t/compilation-error-on-macos-monterey-error-no-member-named-strtoul-in-the-global-namespaceusing-error-in-sink-type-output-invalid-connection/29294 "2022-11-01T19:09:37Z")

</div>

Hello! I’m trying to replicate an example of fitting an autoregressive model in rstan (Autoregressive Modeling in Stan), and am running into compiler issues, which is weird, because everything was working as normal a few…

---

## [Compiling cmdstan on a supercomputer, wrong rpath value being used](https://discourse.mc-stan.org/t/compiling-cmdstan-on-a-supercomputer-wrong-rpath-value-being-used/29187)

<div class="topic-metadata">

**Author:** [@mabalenk](https://discourse.mc-stan.org/u/mabalenk)\
**Replies:** 1\
**Last updated:** [October 30, 2022, 4:57pm UTC](https://discourse.mc-stan.org/t/compiling-cmdstan-on-a-supercomputer-wrong-rpath-value-being-used/29187 "2022-10-30T16:57:11Z")

</div>

I’m trying to compile cmdstan v2.18.1 on a supercomputer. The HPC system hosts multiple GNU and non-GNU compilers. I’m using GNU compiler toolchain v.9.3.0. At the final linking stage of stanc the system uses a wrong pat…

---

## [Cmdstan model compilation fails after conda installation (Big Sur)](https://discourse.mc-stan.org/t/cmdstan-model-compilation-fails-after-conda-installation-big-sur/28252)

<div class="topic-metadata">

**Author:** [@wpmarble](https://discourse.mc-stan.org/u/wpmarble)\
**Replies:** 8\
**Last updated:** [July 27, 2022, 2:35pm UTC](https://discourse.mc-stan.org/t/cmdstan-model-compilation-fails-after-conda-installation-big-sur/28252 "2022-07-27T14:35:39Z")

</div>

I have been unable to use cmdstan due to compiler issues that are obscure to me. Today I re-installed cmdstan through conda. (I also tried installing via cmdstanr but ran into the same issue)… The conda installation seem…

---

## [Unable to compile stan model using cmdstanr 2.29.2](https://discourse.mc-stan.org/t/unable-to-compile-stan-model-using-cmdstanr-2-29-2/27960)

<div class="topic-metadata">

**Author:** [@ScottAlder](https://discourse.mc-stan.org/u/ScottAlder)\
**Replies:** 8\
**Last updated:** [June 28, 2022, 8:31pm UTC](https://discourse.mc-stan.org/t/unable-to-compile-stan-model-using-cmdstanr-2-29-2/27960 "2022-06-28T20:31:42Z")

</div>

Hello, This is my first time trying to use cmdstanr. My goal is to get the 2.30.0-rc1 version working, but for now I am just trying to use the latest stable release (2.29.2). So far I am unable to compile a model from …

---

## [Compiling error in MacOS Monterey (clang)](https://discourse.mc-stan.org/t/compiling-error-in-macos-monterey-clang/27717)

<div class="topic-metadata">

**Author:** [@bluestar](https://discourse.mc-stan.org/u/bluestar)\
**Replies:** 1\
**Last updated:** [June 5, 2022, 11:51am UTC](https://discourse.mc-stan.org/t/compiling-error-in-macos-monterey-clang/27717 "2022-06-05T11:51:46Z")

</div>

Hello I am new to PyStan. I am trying to run this code. I created a conda vitural environment but running train.py gives me the following error INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon\_model\_33b001bedecf1e0fef…

---

## [Compilation of Stan program failing due to mingw32-make.exe](https://discourse.mc-stan.org/t/compilation-of-stan-program-failing-due-to-mingw32-make-exe/27422)

<div class="topic-metadata">

**Author:** [@Erik\_Ruzek](https://discourse.mc-stan.org/u/Erik_Ruzek)\
**Replies:** 5\
**Last updated:** [May 12, 2022, 5:15pm UTC](https://discourse.mc-stan.org/t/compilation-of-stan-program-failing-due-to-mingw32-make-exe/27422 "2022-05-12T17:15:29Z")

</div>

Hello, I am having difficulty compiling Stan programs when invoking cmdstanr either through brms or when invoking direct compile using cmdstanr. The problem is due to the ming32w-make.exe hitting an internal readdir err…

---

## [Double free or corruption (out) depending on Linux version](https://discourse.mc-stan.org/t/double-free-or-corruption-out-depending-on-linux-version/26805)

<div class="topic-metadata">

**Author:** [@jfhawkin](https://discourse.mc-stan.org/u/jfhawkin)\
**Replies:** 11\
**Last updated:** [March 21, 2022, 2:55pm UTC](https://discourse.mc-stan.org/t/double-free-or-corruption-out-depending-on-linux-version/26805 "2022-03-21T14:55:04Z")

</div>

I am running a model on my university cluster. It’s my first time running my Stan code anywhere except my laptop. The computing center support team has been able to help me narrow the issue to a difference between the in…

---

## [Reduce\_sum running time error](https://discourse.mc-stan.org/t/reduce-sum-running-time-error/25030)

<div class="topic-metadata">

**Author:** [@blackrabite](https://discourse.mc-stan.org/u/blackrabite)\
**Replies:** 4\
**Last updated:** [February 24, 2022, 2:31pm UTC](https://discourse.mc-stan.org/t/reduce-sum-running-time-error/25030 "2022-02-24T14:31:12Z")

</div>

Hello, I am trying to run the example shown here https://mc-stan.org/users/documentation/case-studies/reduce\_sum\_tutorial.html, however, I get a strange error during execution: # prepare the data as described in the art…

---

## [Unable to install Rstan on an old linux computer cluster](https://discourse.mc-stan.org/t/unable-to-install-rstan-on-an-old-linux-computer-cluster/26235)

<div class="topic-metadata">

**Author:** [@hlisheng](https://discourse.mc-stan.org/u/hlisheng)\
**Replies:** 3\
**Last updated:** [February 9, 2022, 12:24pm UTC](https://discourse.mc-stan.org/t/unable-to-install-rstan-on-an-old-linux-computer-cluster/26235 "2022-02-09T12:24:50Z")

</div>

Hi, I’ve been using rstan for quite a while, but am a Linux beginner. Recently I needed to install Rstan on a pretty old Linux computer cluster and ran into some hard problems. Linux system info: \[xxngshelisheng@l01 ~\]…

---

## [Compilation Error M1 MacBook Pro](https://discourse.mc-stan.org/t/compilation-error-m1-macbook-pro/26019)

<div class="topic-metadata">

**Author:** [@Peter](https://discourse.mc-stan.org/u/Peter)\
**Replies:** 5\
**Last updated:** [January 25, 2022, 12:31pm UTC](https://discourse.mc-stan.org/t/compilation-error-m1-macbook-pro/26019 "2022-01-25T12:31:14Z")

</div>

I started having problems with Stan models after I updated to macOS 12.1 Monterey. I’m using r , and start seeing error messages, that I’ve never seen before: Error in compileCode(f, code, language = language, verbose …

---

## [Why does pystan require gcc?](https://discourse.mc-stan.org/t/why-does-pystan-require-gcc/25724)

<div class="topic-metadata">

**Author:** [@MarkPundurs](https://discourse.mc-stan.org/u/MarkPundurs)\
**Replies:** 1\
**Last updated:** [December 16, 2021, 11:12pm UTC](https://discourse.mc-stan.org/t/why-does-pystan-require-gcc/25724 "2021-12-16T23:12:44Z")

</div>

Is it actually compiling code? If so, why are compiled files not installed with the package instead? Or does pystan use some gcc functionality other than actual compiling?

---

## [Is there a version of pystan compatible with gcc 4.8.5?](https://discourse.mc-stan.org/t/is-there-a-version-of-pystan-compatible-with-gcc-4-8-5/25717)

<div class="topic-metadata">

**Author:** [@MarkPundurs](https://discourse.mc-stan.org/u/MarkPundurs)\
**Replies:** 2\
**Last updated:** [December 16, 2021, 5:13pm UTC](https://discourse.mc-stan.org/t/is-there-a-version-of-pystan-compatible-with-gcc-4-8-5/25717 "2021-12-16T17:13:42Z")

</div>

I probably need to be taught to fish - but if someone wants to give me a fish, I’ll gratefully accept it.

---

## [Compilation error RSTAN](https://discourse.mc-stan.org/t/compilation-error-rstan/25577)

<div class="topic-metadata">

**Author:** [@cavid](https://discourse.mc-stan.org/u/cavid)\
**Replies:** 5\
**Last updated:** [December 14, 2021, 3:38pm UTC](https://discourse.mc-stan.org/t/compilation-error-rstan/25577 "2021-12-14T15:38:30Z")

</div>

Dear RSTAN community, I’m running into compilation errors when calling a model through brms on my institute’s cluster. Any hints much appreciated! Compilation ERROR, function(s)/method(s) not created! Error in compileC…

---

## [I cannot get opencl to work](https://discourse.mc-stan.org/t/i-cannot-get-opencl-to-work/25171)

<div class="topic-metadata">

**Author:** [@Ax3man](https://discourse.mc-stan.org/u/Ax3man)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 6:13pm UTC](https://discourse.mc-stan.org/t/i-cannot-get-opencl-to-work/25171 "2021-11-08T18:13:58Z")

</div>

I can’t seem to get any model to fit using opencl. Trying to fit any model with brms and opencl = c(0, 0), for example: library(brms) brm(qsec ~ hp, mtcars, backend = 'cmdstanr', opencl = c(0,0)) Or using the cmdstanr …

---

## [How do I tell pystan which compiler to use?](https://discourse.mc-stan.org/t/how-do-i-tell-pystan-which-compiler-to-use/23666)

<div class="topic-metadata">

**Author:** [@James\_Keirstead](https://discourse.mc-stan.org/u/James_Keirstead)\
**Replies:** 2\
**Last updated:** [July 27, 2021, 7:42am UTC](https://discourse.mc-stan.org/t/how-do-i-tell-pystan-which-compiler-to-use/23666 "2021-07-27T07:42:46Z")

</div>

I am trying to build a Stan model within a Docker container using Ubuntu 18.04 and PyStan 3.2.0. I installed PyStan using poetry, and can run the eight schools model with no problems. The model itself was developed on m…

---

## [R CMD SHLIB error for ODE-model](https://discourse.mc-stan.org/t/r-cmd-shlib-error-for-ode-model/23428)

<div class="topic-metadata">

**Author:** [@pasjor](https://discourse.mc-stan.org/u/pasjor)\
**Replies:** 2\
**Last updated:** [July 14, 2021, 10:44am UTC](https://discourse.mc-stan.org/t/r-cmd-shlib-error-for-ode-model/23428 "2021-07-14T10:44:11Z")

</div>

Hello, I have written an IRT model which involves a user-defined probability function. To compute the latter, I need to integrate the exponential of a spline. I accomplished this via “integrate\_ode\_rk45” and it compiled…

---

## [New error: cleanup\_makevar(old) : argument "RMU" is missing, with no default](https://discourse.mc-stan.org/t/new-error-cleanup-makevar-old-argument-rmu-is-missing-with-no-default/18137)

<div class="topic-metadata">

**Author:** [@jkalley](https://discourse.mc-stan.org/u/jkalley)\
**Replies:** 74\
**Last updated:** [June 28, 2021, 1:39am UTC](https://discourse.mc-stan.org/t/new-error-cleanup-makevar-old-argument-rmu-is-missing-with-no-default/18137 "2021-06-28T01:39:33Z")

</div>

Hi all, After moving to R 4.0 and the most recent version of STAN, I’m getting a really strange error while trying to compile using stan\_model. The process throws an error with: Error in cleanup\_makevar(old) : argument…

---

## [Error when compiling brms model](https://discourse.mc-stan.org/t/error-when-compiling-brms-model/23041)

<div class="topic-metadata">

**Author:** [@richard.turner](https://discourse.mc-stan.org/u/richard.turner)\
**Replies:** 2\
**Last updated:** [June 22, 2021, 11:36pm UTC](https://discourse.mc-stan.org/t/error-when-compiling-brms-model/23041 "2021-06-22T23:36:32Z")

</div>

Hi, sorry for not having a reproducible example ready. I am trying to fit a model using brms but am getting hit with the following error: Compiling Stan program... Error in inDL(x, as.logical(local), as.logical(now), ..…

---

## [Can no longer compile models](https://discourse.mc-stan.org/t/can-no-longer-compile-models/22578)

<div class="topic-metadata">

**Author:** [@qp138](https://discourse.mc-stan.org/u/qp138)\
**Replies:** 1\
**Last updated:** [May 23, 2021, 6:29am UTC](https://discourse.mc-stan.org/t/can-no-longer-compile-models/22578 "2021-05-23T06:29:18Z")

</div>

I have been using r/rstudio/rstan for a few years now and not had any real issues. Starting this past weekend I started getting errors when trying to compile any of my models. I reinstalled R/Rstudio/rstan everything but…

---

## [R brms compilation error - DLL initialization](https://discourse.mc-stan.org/t/r-brms-compilation-error-dll-initialization/21842)

<div class="topic-metadata">

**Author:** [@jrydberg](https://discourse.mc-stan.org/u/jrydberg)\
**Replies:** 8\
**Last updated:** [May 17, 2021, 1:23pm UTC](https://discourse.mc-stan.org/t/r-brms-compilation-error-dll-initialization/21842 "2021-05-17T13:23:47Z")

</div>

Hello! I suddenly began running into an issue with running models using brms. The code below worked fine last week, but after updating my R packages this afternoon (04/12/21), I began receiving the following error when a…

---

## [ERROR(s) during compilation with rstan in HPC](https://discourse.mc-stan.org/t/error-s-during-compilation-with-rstan-in-hpc/21948)

<div class="topic-metadata">

**Author:** [@HaiyangJin](https://discourse.mc-stan.org/u/HaiyangJin)\
**Replies:** 6\
**Last updated:** [April 18, 2021, 8:42am UTC](https://discourse.mc-stan.org/t/error-s-during-compilation-with-rstan-in-hpc/21948 "2021-04-18T08:42:18Z")

</div>

I’m trying to use rstan and brms in a High-Performance Computing (HPC) system, which runs Linux 3.10.0-327.36.3.el7.x86\_64 x86\_64. I run the following codes in a Conda environment. I created the Conda environment with f…

---

## [Rstan crashes R at end of model compilation](https://discourse.mc-stan.org/t/rstan-crashes-r-at-end-of-model-compilation/21828)

<div class="topic-metadata">

**Author:** [@Emmanuel\_Charpentier](https://discourse.mc-stan.org/u/Emmanuel_Charpentier)\
**Replies:** 8\
**Last updated:** [April 12, 2021, 1:18pm UTC](https://discourse.mc-stan.org/t/rstan-crashes-r-at-end-of-model-compilation/21828 "2021-04-12T13:18:46Z")

</div>

A recent Debian testing update may have hosed by rstan instalation (BTW, I have the same problem with brms ; I report the rstan example because it’s simpler). Example setup : D1 \<- structure(list(nDate = c(1, 2, 3, 4, …

---

## [Error in compileCode in brms ubuntu 20.04](https://discourse.mc-stan.org/t/error-in-compilecode-in-brms-ubuntu-20-04/21615)

<div class="topic-metadata">

**Author:** [@graden](https://discourse.mc-stan.org/u/graden)\
**Replies:** 6\
**Last updated:** [April 8, 2021, 4:21pm UTC](https://discourse.mc-stan.org/t/error-in-compilecode-in-brms-ubuntu-20-04/21615 "2021-04-08T16:21:12Z")

</div>

Dear all, I’ve been having such a lovely time in the land of Linux, until a few weeks ago my compiler stopped worked unexpectedly. I am on Ubuntu 20.04, all packages up to date (sessionInfo at bottom of this message). P…

---

## [Using reduce\_sum for ODE parallelisation](https://discourse.mc-stan.org/t/using-reduce-sum-for-ode-parallelisation/21479)

<div class="topic-metadata">

**Author:** [@Philipp-Neubauer](https://discourse.mc-stan.org/u/Philipp-Neubauer)\
**Replies:** 24\
**Last updated:** [April 5, 2021, 12:35pm UTC](https://discourse.mc-stan.org/t/using-reduce-sum-for-ode-parallelisation/21479 "2021-04-05T12:35:09Z")

</div>

Hi wonderful Stan folks - I’m looking to parallelize an (otherwise slow) ODE model. To this end I installed rstan 2.26.1 dev (& StanHeaders) according to this post; verified that the original (non-parallel) model compi…

---

## [Impossible compilation in rstan or brms (Linux), due to C++ compilation problem](https://discourse.mc-stan.org/t/impossible-compilation-in-rstan-or-brms-linux-due-to-c-compilation-problem/21406)

<div class="topic-metadata">

**Author:** [@Emmanuel\_Charpentier](https://discourse.mc-stan.org/u/Emmanuel_Charpentier)\
**Replies:** 8\
**Last updated:** [April 2, 2021, 5:31pm UTC](https://discourse.mc-stan.org/t/impossible-compilation-in-rstan-or-brms-linux-due-to-c-compilation-problem/21406 "2021-04-02T17:31:25Z")

</div>

Setup : Linux Debian testing, R 4.0.4. rstan StanHeaders ggplot2 rstantools "2.21.2" "2.21.0-7" "3.3.3" "2.1.1" \> \> system("c++ --version") c++ (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) …

---

## [Failing to make example/bernoulli/bernoulli on CmdStan fresh installation](https://discourse.mc-stan.org/t/failing-to-make-example-bernoulli-bernoulli-on-cmdstan-fresh-installation/21370)

<div class="topic-metadata">

**Author:** [@felipegssantos](https://discourse.mc-stan.org/u/felipegssantos)\
**Replies:** 1\
**Last updated:** [March 19, 2021, 11:30am UTC](https://discourse.mc-stan.org/t/failing-to-make-example-bernoulli-bernoulli-on-cmdstan-fresh-installation/21370 "2021-03-19T11:30:11Z")

</div>

I fresh installed CmdStan using these instructions, following the git clone procedure on MacOS BigSur 11.2.3. When I compile the example to check whether the installation was successful, I get the following error: $ mak…

---

## [What is causing the error in compiling cython file?](https://discourse.mc-stan.org/t/what-is-causing-the-error-in-compiling-cython-file/21155)

<div class="topic-metadata">

**Author:** [@Wang\_Tony](https://discourse.mc-stan.org/u/Wang_Tony)\
**Replies:** 3\
**Last updated:** [March 7, 2021, 8:22am UTC](https://discourse.mc-stan.org/t/what-is-causing-the-error-in-compiling-cython-file/21155 "2021-03-07T08:22:35Z")

</div>

Hi, I just began to learn to Stan. I was using Rstan but it crashes every now and then with R studio so I turned to pystan. Here I tried to compile my first model code: “”" data { int N; // number of counties int T…

---

## [Error when compiling Stan program through brms](https://discourse.mc-stan.org/t/error-when-compiling-stan-program-through-brms/20300)

<div class="topic-metadata">

**Author:** [@YidaZhang0628](https://discourse.mc-stan.org/u/YidaZhang0628)\
**Replies:** 2\
**Last updated:** [January 19, 2021, 3:13pm UTC](https://discourse.mc-stan.org/t/error-when-compiling-stan-program-through-brms/20300 "2021-01-19T15:13:18Z")

</div>

I have been using brms for a while in R 3.5.3. A few days ago, the R on our server got upgraded to R 4.0.3. I installed brms in the new R through CRAN without any problem. However, when I tried the example code in https:…

---

## [RStan clang error](https://discourse.mc-stan.org/t/rstan-clang-error/18832)

<div class="topic-metadata">

**Author:** [@SHRINIVAS](https://discourse.mc-stan.org/u/SHRINIVAS)\
**Replies:** 10\
**Last updated:** [October 26, 2020, 4:56am UTC](https://discourse.mc-stan.org/t/rstan-clang-error/18832 "2020-10-26T04:56:14Z")

</div>

Hello Everybody, I am an absolutely fresh recruit to RSTAN With great struggle, I have managed to get myself initiated into this field. I have followed instructions for loading rstan as follows library(rstan) option…

---

## [New Error: 'C:/rtools40/usr/mingw\_/bin/g++' not found; Allocating Large Vector](https://discourse.mc-stan.org/t/new-error-c-rtools40-usr-mingw-bin-g-not-found-allocating-large-vector/18146)

<div class="topic-metadata">

**Author:** [@kartermycroft](https://discourse.mc-stan.org/u/kartermycroft)\
**Replies:** 6\
**Last updated:** [September 23, 2020, 12:45am UTC](https://discourse.mc-stan.org/t/new-error-c-rtools40-usr-mingw-bin-g-not-found-allocating-large-vector/18146 "2020-09-23T00:45:29Z")

</div>

Hello all, I just today updated to R 4.0, RTools40, and the latest version of RStudio. After installing those, I also installed the rstan and StanHeaders packages from source. I’m now running into some curious issues try…

[Previous page](https://discourse.mc-stan.org/tag/compiler/61.md?match_all_tags=true&tags%5B%5D=compiler)

[Next page](https://discourse.mc-stan.org/tag/compiler/61.md?match_all_tags=true&page=2&tags%5B%5D=compiler)
