# GPU compilation error

**URL:** <https://discourse.mc-stan.org/t/gpu-compilation-error/30384>\
**Category:** Modeling\
**Created:** [February 14, 2023, 5:38pm UTC](https://discourse.mc-stan.org/t/gpu-compilation-error/30384 "2023-02-14T17:38:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roeysc](https://avatars.discourse-cdn.com/v4/letter/r/f6c823/32.png) [@roeysc](https://discourse.mc-stan.org/u/roeysc)\
**Post date:** [February 14, 2023, 5:38pm UTC](https://discourse.mc-stan.org/t/gpu-compilation-error/30384/1 "2023-02-14T17:38:50Z")

</div>

Hi Stan Community!

I successfully used cmdstan-2.30.1 to compile a Stan model for use with GPU using OpenCL. However, trying to do so for another model resulted in multiple errors I am not sure how to handle, all seem to be related to the stan\_math library. My complication call is this:

`make STAN_OPENCL=TRUE STAN_THREADS=TRUE FULL/PATH/TO/MODEL`  
and I have also tried:  
`make STAN_OPENCL=TRUE OPENCL_DEVICE_ID=0 STAN_THREADS=TRUE FULL/PATH/TO/MODEL`

As I am unable to copy the terminal output from the remote node I am working on, I share a screenshot that I hope will be helpful.

 ![opencl_error](https://canada1.discourse-cdn.com/flex030/uploads/mc_stan/original/2X/0/07297a7c4b7c387020c1070b6bb26ab07bae1880.png)

The specific model I am trying to compile is a model that uses wiener\_lpdf().

If you have any clue what might be causing this, I would love to get your help with this.

Many thanks,  
Roey

---

<div class="post-metadata">

**Author:** ![WardBrian](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wardbrian/32/12078_2.png) [@WardBrian](https://discourse.mc-stan.org/u/WardBrian)\
**Post date:** [February 14, 2023, 5:47pm UTC](https://discourse.mc-stan.org/t/gpu-compilation-error/30384/2 "2023-02-14T17:47:40Z")

</div>

@rok_cesnovar
