Giter VIP home page Giter VIP logo

Comments (8)

brian-lau avatar brian-lau commented on June 12, 2024

When you get this error, is there a *.stan file in your working directory? Does your working directory have any spaces in the name?

from matlabstan.

mhinne avatar mhinne commented on June 12, 2024

Hmm no to both questions. After running a model, a *.stan file was created in the pwd though (anon_model.stan). Subsequent runs gave a pop-up asking for a new file name.

I'm testing this on two different computers, both Windows 7, 64 bits (two different work places). The second computer gives the following error instead:

Error using StanModel/stan_version
Output argument "ver" (and maybe others) not assigned during call to
"C:\Users\Max\Documents\MATLAB\Packages\MatlabStan-    2.7.0.0\StanModel.m>StanModel.stan_version".

Not sure if it's related of course, but the hardware and OS of both systems is identical.

from matlabstan.

mhinne avatar mhinne commented on June 12, 2024

Perhaps related (although it wouldn't appear so) is the warning that precedes this error:

Warning: # of chains > # of cores. 
> In StanModel>StanModel.set.chains at 470
  In StanModel>StanModel.StanModel at 224
  In stan at 108 

Even though I'm only running 1 chain.

from matlabstan.

brian-lau avatar brian-lau commented on June 12, 2024

I'm still confused. Would you be so kind as to try running the model outside of Matlab at the command line? The .stan file and data are here:

https://github.com/stan-dev/example-models/tree/master/misc/eight_schools

Thanks.

from matlabstan.

mhinne avatar mhinne commented on June 12, 2024

That works like a charm!

from matlabstan.

mhinne avatar mhinne commented on June 12, 2024

So I'm basically getting different errors on both systems (they are far apart so difficult to try both at the same time). System one gives the 'no compiled in support x86_64' error, system two gives the problem with getting the Stan version.

I'm currently on system two, where I've now tried:

  • changing the cmdstan installation to a path without spaces: no changes
  • I can get the stanc version via cygwin, which I used to compile cmdstan with. However, when I use 'stanc --version' in the windows command utility, I get the error 'application unable to start correctly'. I assume this is what MatlabStan uses under the hood, and is where the problem arises.

from matlabstan.

brian-lau avatar brian-lau commented on June 12, 2024

Thanks for the update. For system two, you are correct, I'm calling down to stanc to get the version. I would have assumed that this would prevent you from running the eight_schools or bernoulli examples from the command line as well?

from matlabstan.

mhinne avatar mhinne commented on June 12, 2024

I'm sorry for the confusion: I have tried the eight-schools and Bernoulli example using cygwin. Here, the cmdstan tool works as intended (and also gives me the correct version). However, Matlab presumably uses the windows Cmd tool (or something similar), in which this goes awry.

I have now found a dirty hack for system two, which is to simply put
ver = '2.7.0';
in the version() function in StanModel.m. Apparently, stanc performs fine otherwise, because now I can run everything from within Matlab.

I'll return to system one on Monday. I'm suspecting I have some libraries messed up.

Thanks a lot for your support by the way - the tool is great when it works! :-)

from matlabstan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.