Running the 8 schools example gives me the following:
Having a problem getting stan version.
This is likely a problem with Java running out of file descriptors
Trying again.
Trying again.
Trying again.
Trying again.
Trying again.
Trying again.
Giving up.
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set ‘UniformOutput’ to false.
Error in StanModel/stan_version (line 850)
ver = cellfun(@str2num,regexp(str{3},’.’,‘split’));
Error in StanModel (line 196)
ver = self.stan_version();
Error in stan (line 108)
model = StanModel();
Error in tester (line 29)
fit = stan(‘model_code’,schools_code,‘data’,schools_dat);
From the output it looks to me that stanc is not on PATH. Hence it’s not able to just run it from a new shell. I think you can solve this by adding the cmdstan bin folder to your “Environment variables” in Windows.
I just switched from cmdstan-2.23.0 to cmdstan-2.17-1. Now there’s no issue anymore. It seems like the new cmdstan doesn’t work well with MatlabStan, which hasn’t been updated for quite a while.
As I can see matlabstan does not support mingw32-make so 2.21 definitely does not work out of the box, at least not on Windows. So 2.22 and 2.23 that both use stanc3 also dont work.
I am not sure if we want to change the version output back. The original reason of why we added the 3 to the version number in the --version output is that both STANC2 and stanc3 binaries were named bin/stanc. That reason is not there right now, that is true.
That is probably something we missed during the release (this should say stanc3 v2.23 (Unix)). That is how it was for 2.22.
If we changed the version output back, both would say
Unfortunately, I think the best solution would be for someone to fork the matlabstan repo and fix this issue along with the mingw32-make thing. One easy trick to make 2.22/2.23 work is using stanc2 (see https://github.com/brian-lau/MatlabStan/issues/57)
I can assist if help is needed but my Matlab/Octave skills are stuck in my undergrad years and I dont plan on reviving them anytime soon :)