Using cmdstanr on Sharcnet cluster leads to processx errors

I’m running into a bit of a brick wall attempting to compile Stan models on compute canada clusters. Here’s a quick example of code that breaks:

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

Running the second line fails with:

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.

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.

1 Like