# Using cmdstanr on Sharcnet cluster leads to processx errors

**URL:** <https://discourse.mc-stan.org/t/using-cmdstanr-on-sharcnet-cluster-leads-to-processx-errors/29989>\
**Category:** CmdStan\
**Created:** [January 10, 2023, 1:13am UTC](https://discourse.mc-stan.org/t/using-cmdstanr-on-sharcnet-cluster-leads-to-processx-errors/29989 "2023-01-10T01:13:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonPekos](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jasonpekos/32/14897_2.png) [@JasonPekos](https://discourse.mc-stan.org/u/JasonPekos)\
**Post date:** [January 10, 2023, 1:13am UTC](https://discourse.mc-stan.org/t/using-cmdstanr-on-sharcnet-cluster-leads-to-processx-errors/29989/1 "2023-01-10T01:13:06Z")

</div>

I’m running into a bit of a brick wall attempting to compile Stan models on [compute canada clusters](https://www.sharcnet.ca/my/front/). Here’s a quick example of code that breaks:

```plaintext
file <- file.path("path to stan model")
mod <- cmdstan_model(file)

```

Running the second line fails with:

```plaintext
Error in `process_initialize(self, private, command, args, stdin, stdout, …\`:
! Native call to `processx_exec` failed
Caused by error in `chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …\`:
! cannot start processx process '/project/6006158/pekos/[path to executable]' (system error 13, Permission denied) @unix/processx.c:611 (processx_exec)

```

This breaks for any model that isn’t up to date. For model which are up to date — e.g. the Bernoulli example — I can sample from them fine, and output looks good.

---

<div class="post-metadata">

**Author:** ![JasonPekos](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jasonpekos/32/14897_2.png) [@JasonPekos](https://discourse.mc-stan.org/u/JasonPekos)\
**Post date:** [January 10, 2023, 2:26am UTC](https://discourse.mc-stan.org/t/using-cmdstanr-on-sharcnet-cluster-leads-to-processx-errors/29989/2 "2023-01-10T02:26:16Z")

</div>

Ok, it was a dumb mistake on my part: when I copied my files over from my local computer, I accidentally copied over stan model executables which were compiled for a different architecture. Deleting all executables and recompiling solved my problem.
