# Compilation error on HPC cluster

**URL:** <https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394>\
**Category:** brms\
**Tags:** installation, compiler\
**Created:** [April 17, 2020, 6:49am UTC](https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394 "2020-04-17T06:49:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpr6mg](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jpr6mg](https://discourse.mc-stan.org/u/jpr6mg)\
**Post date:** [April 17, 2020, 6:49am UTC](https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394/1 "2020-04-17T06:49:23Z")

</div>

Hi there,

I’m hoping to get a little help resolving a compilation error when I try to run brms on an HPC cluster. I’ve put together a script that successfully compiles and runs a brms model on my personal computer, but when I run it on the cluster I get the following error:

```
Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) : 
  Compilation ERROR, function(s)/method(s) not created! file392ad7fcbbb5.cpp(6): warning #2217: white space is required between the macro name "STAN __SERVICES__ COMMAND_HPP" and its replacement text
  #define STAN __SERVICES__ COMMAND_HPP#include <boost/integer/integer_log2.hpp>
                                     ^

```

Based on similar posts on the forum, I also tried the test model below and got the same result.

```
m <- stan_model(model_code = 'parameters {real y;} model {y ~ normal(0,1);}', obfuscate_model_name = FALSE)

```

Operating System: CentOS Linux 7 (Core)  
Interface Version: packageVersion(“rstan”): 2.19.3; packageVersion(“brms”): 2.12.0  
Compiler/Toolkit: Intel 18.0.2 compiler suite (C, C++, Fortran)

Apologies if I missed something obvious in the installation docs. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [April 17, 2020, 2:33pm UTC](https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394/2 "2020-04-17T14:33:16Z")

</div>

Probably the compiler is too old. You need the RHEL development toolset. And probably to do

> **[stan-dev/rstan](https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Linux#c-toolchain-configuration)**
>
> RStan, the R interface to Stan. Contribute to stan-dev/rstan development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![jpr6mg](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jpr6mg](https://discourse.mc-stan.org/u/jpr6mg)\
**Post date:** [April 17, 2020, 5:51pm UTC](https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394/3 "2020-04-17T17:51:27Z")

</div>

Perfect, thanks for the help. Just needed to load the GNU compiler suite rather than Intel.

---

<div class="post-metadata">

**Author:** ![yizhang](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/yizhang/32/15673_2.png) [@yizhang](https://discourse.mc-stan.org/u/yizhang)\
**Post date:** [April 27, 2020, 3:30am UTC](https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394/4 "2020-04-27T03:30:02Z")

</div>

I ran into this a while ago and would like to see it as an easily fixable issue of rstan: just add a space in corresponding rstan `paste` script.

---

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [April 27, 2020, 6:03am UTC](https://discourse.mc-stan.org/t/compilation-error-on-hpc-cluster/14394/5 "2020-04-27T06:03:40Z")

</div>

That can / will / has been fixed but you still need a C++14 compatible compiler.
