-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tough time running Stan in Julia #1
Comments
Alright, trying it out on two Linux machines (office computer running Julia 1.0.3 and cluster main node running Julia 1.1.1). On office computer I am having a bad start:
On the cluster I am progressing a bit farther bu then I run into this error:
... which tell me that cmdstan is needed to run Stan and I cannot do that on the cluster computer (though I could perhaps request it). |
Indeed. CmdStan.jl and Stan.jl (both seem to do the same thing - I think perhaps Stan.jl is the new package still in development) are just Julia interfaces for cmdstan which is a package to run Stan at command line. For whatever reason I cannot get CmdStan.jl to start cmdstan.. I fix one error and another pops up.. over and over... |
OK, I'll try a bit more as well... BTW, I noticed that you are writing the installation instructions based on the OS first. I'll follow that example and start writing instructions for Linux... |
I tried again and success! I downloaded the latest binary of Julia (version 1.2.0) and used that. But I needed to start in bash:
Now in Julia:
Finally, and I am not sure if this step is needed but I did it:
After that I was able to run the example. |
Hmmm... one odd complication is apparently that "Stan" requires |
Great to know that you had relatively minimal issues.. although Arpack was a new twist. As for StanSample.jl vs. Stan.jl, I'm not too sure, because I see StanSample examples on the Stan.jl GitHub.. and I also see the authors note that big changes are coming to Stan.jl so perhaps you are right that it is a work in progress, and perhaps StanSample.jl will become part of Stan.jl. CmdStan.jl seems to be the older and more common when I Google around, so we may want to try working with that too.. I'll keep the issue open until I have more PC updates. For now I am going to continue working on the introduction to Bayes/Stan notebook as that is more fun and less frustrating.. |
Well, good to hear you got it working on the Mac at least, i think the combo Windows+Julia might be pretty rare, though we should have probably asked that in the survey. We could still send out an email asking everyone about their OS... |
Not sure if this will help (and maybe it's already been discussed above) but one possibility could be to use an external installation (done via Conda or pip) through That approach has worked for me in order to call Just in case this is useful... |
Please edit the issue title to something like Please, as soon as you get a chance Thanks @jpmattern for your prompt intervention |
Haha, edited the title. I, too, got confused when I had a tab open that said "Bitch". Gael, would you say your approach is easy enough for a bunch of participants to copy? You are using a mac, I assume? |
Interesting, @gaelforget so you are suggesting that we interact with PyStan from Jupyter via PyCall? |
And my apologies for making you guys uncomfortable with my bad language :-P |
I am also noticing an RCall package! |
Don't know -- calling c++ from Julia via python or R is probably never going to be easy enough
yes although my
Not sure but figured you might want to give it a try |
I am trying to install and run Stan in Julia right now. I ran into the JULIA_CMDSTAN_HOME issue. So how do you set JULIA_CMDSTAN_HOME? |
This will probably fix you up: We will add these steps to the install instructions... |
OK, thanks! Now, I am getting the following scary error message: ERROR: error when compiling Stan model at /var/folders/bm/6jw569yj77l9l56ql9s5lrth0000gn/T/jl_0xFUWG/mod.stan |
Yikes. Did a bit of Googling and it seems that 'malformed or corrupted AST file' is associated with a failure of your Xcode C++ compiler. (Oddly I did not find anyone reporting this error using Stan). Did you update Xcode or iOS recently? If not, perhaps try updating Xcode? |
I've tried a new installation using the steps on this page for stan + Julia on OSX / MacOS. Similar problem as above |
All good after adding |
I had no problem running STAN under python via Jupyter under Windows, but I was unable to even build cmdstan for "StanSample.jl". I haven't used Anaconda on Windows (or anywhere), but it does not seem to install basic linux utils. I used conda to install make from anaconda channel, but it complains about not finding /bin/sh when attempting to execute make build, so it's expecting at least some minimal bash shell. I uninstalled the anaconda make and installed one under the conda-forge channel. It got a bit farther in some ways but failed issuing the following:
g++ seems to run OK, but I don't see any binary produced. I also don't understand the complaint about 'cut' from make. It also looks like it's having problems finding headers for sundials, given cvoids.hpp and similar files not being found. I will continue to mess around (at least for a bit), but any ideas are appreciated. |
Example worked fine for me too (once
In case others are in the same situation, here is a work-around :
|
I thought I was making progress
Seems like there is something I need to add under the Anaconda environment (like the set of linux tools) |
Joe, haven't seen this error pop up yet.. Unfortunately the connection between Julia and cmdstan has been producing some incomprehensible errors. If issues persist I recommend sticking with your working PyStan implementation. |
Right. I'm now trying to go entirely via the Linux windows subsystem
instead of trying to get windows and Linux to play well together. But, just
getting off train so had to stop, but will pick up at meeting
Thanks!
…On Wed, Jan 8, 2020, 6:54 AM Gregory L Britten ***@***.***> wrote:
Joe, haven't seen this error pop up yet.. Unfortunately the connection
between Julia and cmdstan has been producing some incomprehensible errors.
If issues persist I recommend sticking with your working PyStan
implementation.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEAHGSWGTKAPVW5X5PGM34LQ4W5IBANCNFSM4JDEDOFA>
.
|
Wu (lab mate) and I tried installing and running Stan in Julia yesterday and had a bitch of a time. It's still not working on my PC. Wu was able to get it to work on his Mac after having to fix several weird paths and settings. (I remember folks in the past having a harder time with Julia). Could you give it a go on your system and let me know if you run into issues? We'll have to sort out potential issues if we're going to support Julia in the workshop..
I'm going to give it another go on my PC and will post a question to the author of CmdStan.jl/Stan.jl
I'm also going to try it on my old Mac to see how it goes.
The text was updated successfully, but these errors were encountered: