Sampling issues with matlab stan

Short summary of the problem

I face issues with sampling on running the classic example provided in the link Getting Started · brian-lau/MatlabStan Wiki · GitHub. The following is the error I see.

output-1.csv: /home/…/MatlabStan-2.15.1.0/sample11: symbol lookup error: /home/…/MatlabStan-2.15.1.0/sample11: undefined symbol: _ZN3tbb10interface914global_control15internal_createEv
Warning: Stan seems to have exited badly.
output-2.csv: /home/…/MatlabStan-2.15.1.0/sample11: symbol lookup error: /home/…/MatlabStan-2.15.1.0/sample11: undefined symbol: _ZN3tbb10interface914global_control15internal_createEv
Warning: Stan seems to have exited badly.
output-3.csv: /home/…/MatlabStan-2.15.1.0/sample11: symbol lookup error: /home/…/MatlabStan-2.15.1.0/sample11: undefined symbol: _ZN3tbb10interface914global_control15internal_createEv
Warning: Stan seems to have exited badly.
output-4.csv: /home/…/MatlabStan-2.15.1.0/sample11: symbol lookup error: /home/…MatlabStan-2.15.1.0/sample11: undefined symbol: _ZN3tbb10interface914global_control15internal_createEv
Warning: Stan seems to have exited badly.

Not sure if it has something to do with libraries. Would be grateful if any one can help resolve this issue and help run the programming through MATLAB.
code_to_run_your_model(if_applicable)


If possible, add also code to simulate data or attach a (subset of) the dataset you work with.

%From the link: https://github.com/brian-lau/MatlabStan/wiki/Getting-Started
schools_code = {
   'data {'
   '    int<lower=0> J; // number of schools '
   '    real y[J]; // estimated treatment effects'
   '    real<lower=0> sigma[J]; // s.e. of effect estimates '
   '}'
   'parameters {'
   '    real mu; '
   '    real<lower=0> tau;'
   '    real eta[J];'
   '}'
   'transformed parameters {'
   '    real theta[J];'
   '    for (j in 1:J)'
   '    theta[j] <- mu + tau * eta[j];'
   '}'
   'model {'
   '    eta ~ normal(0, 1);'
   '    y ~ normal(theta, sigma);'
   '}'
};
  
schools_dat = struct('J',8,...
                     'y',[28 8 -3 7 -1 1 18 12],...
                     'sigma',[15 10 16 11 9 11 10 18]);

fit = stan('model_code',schools_code,'data',schools_dat);



Operating System: Linux

Thanks much!

Unfortunately MatlabStan is not actively maintained by anybody, and is not supported. From the github repo it doesn’t look it’s been updated in almost four years.

Unfortunately I don’t believe there is a currently maintained way to interact with Stan through Matlab

One thing that you could try is to install a matching old version of CmdStan (2.15 if I recall correctly) and see if the problem goes away. Unfortunately we can’t provide much better support at this time…

Thanks for all your replies!