StanJulia / Stan.jl

Stan.jl illustrates the usage of the 'single method' packages, e.g. StanSample, StanOptimize, etc.
MIT License
213 stars 31 forks source link

change names(sid1) to fieldnames(sid1) in README #18

Closed robertfeldt closed 8 years ago

robertfeldt commented 8 years ago

Just tried the example in the README and things work but I get this warning:

julia> names(sim1) |> display
WARNING: names(v) is deprecated, use fieldnames(v) instead.

so maybe update the README?

goedman commented 8 years ago

Hi Robert,

Thanks a lot for fixing the Homebrew formula! I'd hoped to set time aside but too much other stuff.

README is now updated. Thanks for the heads up. I always test with Pkg.test("Stan").

I'll test the Homebrew version out today, tag it and submit a PR to METADATA.

Regards, Rob

robertfeldt commented 8 years ago

Thanks Rob.

Unfortunately I ran Pkg.test("Stan") now but there seems to be some problem:

ErrorException("failed process: Process(`make /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli`, ProcessExited(2)) [2]")
CMDSTAN_HOME found, but CmdStan not installed properly.
LoadError("/Users/feldt/.julia/v0.4/Stan/test/test_bernoulli.jl",10,LoadError("/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/bernoulli.jl",43,MethodError(size,(nothing,1))))
No simulation runs have been performed.

Not sure what this can be since I can run the example from the README manually without problems. If I can help debug this please just ask or point to things I should try on my machine.

robertfeldt commented 8 years ago

No, there seems to be some problem still. I went into Examples dir of Stan.jl and made sure there is no tmp dir in Bernoulli and then I get the same ErrorException as when running Pkg.test. Not sure what is the problem since I have tried cmdstan from the command line after installing with homebrew and that works fine.

goedman commented 8 years ago

Hi Robert,

I think cmdstan.rb has now been updated in Homebrew. After I run 'brew update cmdstan' I don't see make, makefile and src/... in .../Cellar/cmdstan/2.9.0/... The 2.9.0 is new, it used to only install 2.7.0. Hopefully below pics are visible.

What do you see?

Rob

screen shot 2016-01-14 at 07 31 46 screen shot 2016-01-14 at 07 32 00
robertfeldt commented 8 years ago

Yes, it's probably that we need to ensure more is copied over in the Homebrew install. Right now I based it on the previous cmdstan.rb script but that seems to not have been complete then. Should we be ok if we copy the whole "stan_2.9.0" over?

goedman commented 8 years ago

Correct. We might not need all of it but the Stan team does a lot of refactoring and it is not always trivial what is needed, that might be the 'safest' approach for now. The Stan team does seem to do a good job keeping the toplevel for CmdStan stable.

For the README example to work it must have picked up old stuff I guess?

Thanks for your help!

robertfeldt commented 8 years ago

Yes, I must have had an ealier build of the Bernoulli example already in my Stan.jl repo copy. I'm trying what the install path should be right now. Will update the cmdstan.rb homebrew script when verified correct.

robertfeldt commented 8 years ago

I've found out how to copy the whole stan_2.9.0 dir over to the homebrew install and have updated the formula but there are still problems when building. Maybe we can solve this together. Do you know if any other files or directories need to be copied over and to where?

After I install with the new formula:

https://github.com/robertfeldt/homebrew-science/blob/master/cmdstan.rb

the directory looks like:

feldt:~$ ls -al /usr/local/Cellar/cmdstan/2.9.0/
total 8
drwxr-xr-x   6 feldt  admin  204 Jan 14 22:31 .
drwxr-xr-x   3 feldt  admin  102 Jan 14 22:30 ..
-rw-r--r--   1 feldt  admin  313 Jan 14 22:31 INSTALL_RECEIPT.json
drwxr-xr-x   4 feldt  admin  136 Jan 14 22:31 bin
drwxr-xr-x   3 feldt  admin  102 Jan 14 22:31 share
drwxr-xr-x  14 feldt  wheel  476 Jan 14 22:30 stan_2.9.0

and they have the same size so should be ok:

feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/stan_2.9.0
247M    /usr/local/Cellar/cmdstan/2.9.0/stan_2.9.0
feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/stan_2.9.0
247M    /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/stan_2.9.0
robertfeldt commented 8 years ago

When I tried copying over also the make dir and makefile it can compile the Stan.jl generated model into object files but cannot link to an executable so still something seems to be missing. Maybe we need to include the whole cmdstan dir since I'm not sure what Stan.jl requires to be there...

goedman commented 8 years ago

Hi Robert,

Maybe this has to do with the fact that in the non-homebrew install make/, makefile and src/ are one level up. The bin/, make/, makefile and src/ are on the top level. This is kind of fixed (I think) as Stan’s make dictates that. This is the part where I always feel I’m chasing my tail :-). The 2 make directories are not identical either and neither the src/ dirs. And like I said, it’s likely to change with every release.

That’s the key reason I chose to use 'make modelname’ in src/stancode.jl (line 37). Does the build_log in tmp/ show anything?

I wonder if we can end up with an identical structure, maybe by creating symbolic links on the top level. Is that possible in Homebrew formulas?

Over the weekend I’ll try if I can manually create symbolic links for make/, makefile and src/. The last one is a problem because it holds a subdir cmdstan/ that is not present in stan_2.9.0/. Which makes sense, CmdStan is an interface to Stan.

Regards, Rob

compared to what I see

On Jan 14, 2016, at 14:15, Robert Feldt notifications@github.com wrote:

When I tried copying over also the make dir and makefile it can compile the Stan.jl generated model into object files but cannot link to an executable so still something seems to be missing. Maybe we need to include the whole cmdstan dir since I'm not sure what Stan.jl requires to be there...

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-171798982.

robertfeldt commented 8 years ago

Ok, but if I copy all of these dirs and files over to the Homebrew install dir:

    prefix.install "stan_2.9.0"
    prefix.install "src"
    prefix.install "makefile"
    prefix.install "make"

it seems it tries to rebuild stanc when I run Pkg.test("Stan") and then still fails to link after successfully compiling:

julia> Pkg.test("Stan")
INFO: Testing Stan
Running tests for Stan-j0.4-v0.3.2:

  * test_utilities.jl *
`echo 2`
`echo 3 4`
`echo 5`

1
2
3
4
5

hello
hello
... [Many lines skipped] ...
g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256   -c -O0 -o bin/stan/lang/grammars/whitespace_grammar_inst.o stan_2.9.0/src/stan/lang/grammars/whitespace_grammar_inst.cpp
g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256   -c -O0 -o bin/stan/lang/ast_def.o stan_2.9.0/src/stan/lang/ast_def.cpp
ar -rs bin/libstanc.a bin/stan/lang/grammars/bare_type_grammar_inst.o bin/stan/lang/grammars/expression07_grammar_inst.o bin/stan/lang/grammars/expression_grammar_inst.o bin/stan/lang/grammars/functions_grammar_inst.o bin/stan/lang/grammars/indexes_grammar_inst.o bin/stan/lang/grammars/program_grammar_inst.o bin/stan/lang/grammars/statement_2_grammar_inst.o bin/stan/lang/grammars/statement_grammar_inst.o bin/stan/lang/grammars/term_grammar_inst.o bin/stan/lang/grammars/var_decls_grammar_inst.o bin/stan/lang/grammars/whitespace_grammar_inst.o bin/stan/lang/ast_def.o
g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256    -O0 -o bin/stanc bin/cmdstan/stanc.o -Lbin -lstanc
ErrorException("failed process: Process(`make /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli`, ProcessExited(2)) [2]")
CMDSTAN_HOME found, but CmdStan not installed properly.
LoadError("/Users/feldt/.julia/v0.4/Stan/test/test_bernoulli.jl",10,LoadError("/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/bernoulli.jl",43,MethodError(size,(nothing,1))))
No simulation runs have been performed.

INFO: Stan tests passed

and if I check the build log:

feldt:~$ cat ~/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli_build.log
ar: creating archive bin/libstanc.a
ld: can't write output file: bin/stanc for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/stanc] Error 1
feldt:~$

Hope this helps in pinpointing the problem.

robertfeldt commented 8 years ago

Oh and here is to verify that the dirs have been copied over:

feldt:~$ ls -al /usr/local/Cellar/cmdstan/2.9.0/
total 24
drwxr-xr-x   9 feldt  admin   306 Jan 15 14:47 .
drwxr-xr-x   3 feldt  admin   102 Jan 15 14:46 ..
-rw-r--r--   1 feldt  admin   313 Jan 15 14:47 INSTALL_RECEIPT.json
drwxr-xr-x   7 feldt  admin   238 Jan 15 14:49 bin
drwxr-xr-x   9 feldt  wheel   306 Jan 15 14:46 make
-rw-r--r--   1 feldt  wheel  7763 Dec  5 00:14 makefile
drwxr-xr-x   3 feldt  admin   102 Jan 15 14:47 share
drwxr-xr-x   5 feldt  wheel   170 Jan 15 14:46 src
drwxr-xr-x  14 feldt  wheel   476 Jan 15 14:46 stan_2.9.0
feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/make
 28K    /usr/local/Cellar/cmdstan/2.9.0/make
feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/make
 28K    /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/make
feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/stan_2.9.0
247M    /usr/local/Cellar/cmdstan/2.9.0/stan_2.9.0
feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/stan_2.9.0/
247M    /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/stan_2.9.0/
feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/src
412K    /usr/local/Cellar/cmdstan/2.9.0/src
feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/src
412K    /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/src
feldt:~$ shasum /usr/local/Cellar/cmdstan/2.9.0/makefile
f0585bb98bd09e840581b5c004bcfe39e7e52e5f  /usr/local/Cellar/cmdstan/2.9.0/makefile
feldt:~$ shasum ~/tmp/cmdstan/cmdstan-2.9.0/makefile
f0585bb98bd09e840581b5c004bcfe39e7e52e5f  /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/makefile
goedman commented 8 years ago

Thanks Robert,

I’ll reproduce your steps tomorrow (have something that needs to be finished today) and see if I understand what’s going on.

Quickly scanning your 2 emails, I noticed we’re using g++ here (don’t think that is an issue) but I don’t quite get why the ~/tmp/ comes into the picture. Maybe that’s why it’s rebuilding stanc?

Anyway, prefix.install … is a great step forwards!

Regards, Rob

On Jan 15, 2016, at 06:00, Robert Feldt notifications@github.com wrote:

Oh and here is to verify that the dirs have been copied over:

feldt:~$ ls -al /usr/local/Cellar/cmdstan/2.9.0/ total 24 drwxr-xr-x 9 feldt admin 306 Jan 15 14:47 . drwxr-xr-x 3 feldt admin 102 Jan 15 14:46 .. -rw-r--r-- 1 feldt admin 313 Jan 15 14:47 INSTALL_RECEIPT.json drwxr-xr-x 7 feldt admin 238 Jan 15 14:49 bin drwxr-xr-x 9 feldt wheel 306 Jan 15 14:46 make -rw-r--r-- 1 feldt wheel 7763 Dec 5 00:14 makefile drwxr-xr-x 3 feldt admin 102 Jan 15 14:47 share drwxr-xr-x 5 feldt wheel 170 Jan 15 14:46 src drwxr-xr-x 14 feldt wheel 476 Jan 15 14:46 stan_2.9.0 feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/make 28K /usr/local/Cellar/cmdstan/2.9.0/make feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/make 28K /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/make feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/stan_2.9.0 247M /usr/local/Cellar/cmdstan/2.9.0/stan_2.9.0 feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/stan_2.9.0/ 247M /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/stan_2.9.0/ feldt:~$ du -sh /usr/local/Cellar/cmdstan/2.9.0/src 412K /usr/local/Cellar/cmdstan/2.9.0/src feldt:~$ du -sh ~/tmp/cmdstan/cmdstan-2.9.0/src 412K /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/src feldt:~$ shasum /usr/local/Cellar/cmdstan/2.9.0/makefile f0585bb98bd09e840581b5c004bcfe39e7e52e5f /usr/local/Cellar/cmdstan/2.9.0/makefile feldt:~$ shasum ~/tmp/cmdstan/cmdstan-2.9.0/makefile f0585bb98bd09e840581b5c004bcfe39e7e52e5f /Users/feldt/tmp/cmdstan/cmdstan-2.9.0/makefile — Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-171967962.

robertfeldt commented 8 years ago

The tmp is just an untar of the cmdstan tarball to show that the homebrew install has the same contents. It should have nothing whatsoever to do with the actual install or what is executed in a make. But I must be doing something wrong or have misunderstood so please take a look and maybe we can fix it. Thanks.

goedman commented 8 years ago

Hi Robert,

Had a bit of time so tried a few things. Details below, but for now I’ve concluded it can’t write to Cellar/cmdstan/2.9.0/bin/. Using sudo did work for me.

Now if I then reset CMDSTAN_HOME (I do that in .bash_profile):

export CMDSTAN_HOME=/Users/rob/Projects/Stan/cmdstan

launchctl setenv CMDSTAN_HOME /Users/rob/Projects/Stan/cmdstan

export CMDSTAN_HOME=/usr/local/Cellar/cmdstan/2.9.0 launchctl setenv CMDSTAN_HOME /usr/local/Cellar/cmdstan/2.9.0

Pkg.test(“Stan”) runs

Question is why doesn’t stansummary build?

Will try these steps a few more times over the weekend.

Regards, Rob

———————————————DETAILS---------------------------------------------------------------------------------

A you suggested, I all prefixes, including one for “examples":

def install system "make", "build" bin.install "bin/stansummary" bin.install "bin/stanc" doc.install "CONTRIBUTING.md", "LICENSE", "README.md", "examples" prefix.install "src" prefix.install "make" prefix.install "makefile" prefix.install "examples" prefix.install "stan_2.9.0" (include/"stan").install Dir["stan_2.9.0/lib/stan_math_/stan/"] end

In a terminal I changed to the /usr/local/Cellar/cmdstan/ directory and tried ‘make’. That fails with the same error you are seeing:

ld: can't write output file: bin/stansummary for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [bin/stansummary] Error 1

But the one that is already there seems to work:

MacBook-Pro:2.9.0 rob$ ./bin/stansummary USAGE: stansummary <filename 1> [<filename 2> ... ]

OPTIONS:

--autocorr= Append the autocorrelations for the given chain

--sig_figs= Set significant figures of output (Defaults to 2)

I expect build problem is a permission error, so I tried:

MacBook-Pro:2.9.0 rob$ sudo make -j4 build clang++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -Wno-tautological-compare -Wno-c++11-long-long -ftemplate-depth=256 -O3 -o bin/stansummary bin/cmdstan/stansummary.o

--- CmdStan v2.9.0 built ---

The other 2 commands (print and stanc) don’t need to build here, for some reason only stansummary.

and:

MacBook-Pro:2.9.0 rob$ make examples/bernoulli/bernoulli

--- Translating Stan model to C++ code --- bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp Model name=bernoulli_model Input file=examples/bernoulli/bernoulli.stan Output file=examples/bernoulli/bernoulli.hpp

--- Linking C++ model --- clang++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -Wno-tautological-compare -Wno-c++11-long-long -ftemplate-depth=256 -O3 -o examples/bernoulli/bernoulli src/cmdstan/main.cpp -include examples/bernoulli/bernoulli.hpp

followed by:

MacBook-Pro:2.9.0 rob$ cd examples/bernoulli/ MacBook-Pro:bernoulli rob$ ./bernoulli sample data file=bernoulli.data.R method = sample (Default) sample num_samples = 1000 (Default) num_warmup = 1000 (Default) save_warmup = 0 (Default) thin = 1 (Default) adapt engaged = 1 (Default) gamma = 0.050000000000000003 (Default) delta = 0.80000000000000004 (Default) kappa = 0.75 (Default) t0 = 10 (Default) init_buffer = 75 (Default) term_buffer = 50 (Default) window = 25 (Default) algorithm = hmc (Default) hmc engine = nuts (Default) nuts max_depth = 10 (Default) metric = diag_e (Default) stepsize = 1 (Default) stepsize_jitter = 0 (Default) id = 0 (Default) data file = bernoulli.data.R init = 2 (Default) random seed = 1312396288 output file = output.csv (Default) diagnostic_file = (Default) refresh = 100 (Default)

Gradient evaluation took 5e-06 seconds 1000 transitions using 10 leapfrog steps per transition would take 0.05 seconds. Adjust your expectations accordingly!

Iteration: 1 / 2000 0% Iteration: 100 / 2000 5% Iteration: 200 / 2000 10% Iteration: 300 / 2000 15% Iteration: 400 / 2000 20% Iteration: 500 / 2000 25% Iteration: 600 / 2000 30% Iteration: 700 / 2000 35% Iteration: 800 / 2000 40% Iteration: 900 / 2000 45% Iteration: 1000 / 2000 50% Iteration: 1001 / 2000 50% Iteration: 1100 / 2000 55% Iteration: 1200 / 2000 60% Iteration: 1300 / 2000 65% Iteration: 1400 / 2000 70% Iteration: 1500 / 2000 75% Iteration: 1600 / 2000 80% Iteration: 1700 / 2000 85% Iteration: 1800 / 2000 90% Iteration: 1900 / 2000 95% Iteration: 2000 / 2000 100%

Elapsed Time: 0.008755 seconds (Warm-up)

0.016104 seconds (Sampling)

0.024859 seconds (Total)

On Jan 15, 2016, at 07:28, Robert Feldt notifications@github.com wrote:

The tmp is just an untar of the cmdstan tarball to show that the homebrew install has the same contents. It should have nothing whatsoever to do with the actual install or what is executed in a make. But I must be doing something wrong or have misunderstood so please take a look and maybe we can fix it. Thanks.

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-171991509.

robertfeldt commented 8 years ago

ok, nice. It builds stansummary on my side though so I didn't need to use sudo. Still get problem with Pkg.test("Stan") though but with different log file error:

feldt:~$ cat ~/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli_build.log
make: *** No rule to make target `/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli'.  Stop.
robertfeldt commented 8 years ago

Both stanc and stansummary built by "brew install cmdstan":

feldt:~$ ls -al /usr/local/Cellar/cmdstan/2.9.0/bin
total 9304
drwxr-xr-x  4 feldt  admin      136 Jan 15 23:55 .
drwxr-xr-x  9 feldt  admin      306 Jan 15 23:55 ..
-r-xr-xr-x  1 feldt  wheel  4573384 Jan 15 23:55 stanc
-r-xr-xr-x  1 feldt  wheel   185344 Jan 15 23:55 stansummary
robertfeldt commented 8 years ago

Can it be that libstanc.a is not installed in the homebrew bin dir? And possibly other things from the bin dir. But I'm not sure we can simply add them with bin.install since that will also install symlinks in /usr/local/bin

robertfeldt commented 8 years ago

Ah, I had not gotten "examples" correctly copied over (I had to NOT doc.install "examples" in order to be able to prefix.install it). But yes, I also have to "sudo make build" after the brew install for it to be able to go through with the build in Pkg.test("Stan"). It's strange though for the first build seems to run ok and gives summaryplots etc but a later build fails:

Input observed data dictionary:
4-element Array{Dict{ASCIIString,Any},1}:
 Dict{ASCIIString,Any}("N"=>10,"y"=>[0,1,0,1,0,0,0,0,0,1])
 Dict{ASCIIString,Any}("N"=>10,"y"=>[0,1,0,0,0,0,1,0,0,1])
 Dict{ASCIIString,Any}("N"=>10,"y"=>[0,0,0,0,0,0,1,0,1,1])
 Dict{ASCIIString,Any}("N"=>10,"y"=>[0,0,0,1,0,0,0,1,0,1])

--- Translating Stan model to C++ code ---
bin/stanc /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan --o=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp
Model name=bernoulli_model
Input file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan
Output file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

--- Linking C++ model ---
g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256    -O3 -o /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli src/cmdstan/main.cpp -include /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

Inference for Stan model: bernoulli_model
4 chains: each with iter=(1200,1200,1200,1200); warmup=(0,0,0,0); thin=(1,1,1,1); 4800 iterations saved.

Warmup took (0.0070, 0.010, 0.0089, 0.012) seconds, 0.039 seconds total
Sampling took (0.014, 0.023, 0.022, 0.015) seconds, 0.074 seconds total
... [many lines skipped] ...
Dict{Any,Any} with 6 entries:
  :lp         => [-11.8758]
  :finite_dif => [-4.82969]
  :var_id     => [0]
  :error      => [2.18072e-9]
  :value      => [1.02429]
  :model      => [-4.82969]
File /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan will be updated.

--- Translating Stan model to C++ code ---
bin/stanc /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan --o=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp
Model name=bernoulli_model
Input file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan
Output file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

--- Linking C++ model ---
g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256    -O3 -o /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli src/cmdstan/main.cpp -include /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

ErrorException("failed processes:\n  Process(`./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10000 random seed=-1 init=2 id=1 data file=bernoulli_1.data.R output file=bernoulli_variational_1.csv refresh=100`, ProcessExited(64)) [64]\n  Process(`./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10000 random seed=-1 init=2 id=2 data file=bernoulli_2.data.R output file=bernoulli_variational_2.csv refresh=100`, ProcessExited(64)) [64]\n  Process(`./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10000 random seed=-1 init=2 id=3 data file=bernoulli_3.data.R output file=bernoulli_variational_3.csv refresh=100`, ProcessExited(64)) [64]\n  Process(`./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10
goedman commented 8 years ago

Hi Robert,

Can you try Pkg.checkout(“Stan”), I believe I never tagged the update I made for ADVI (from the elbow argument I’m guessing it is trying the variational_ayes example.

Rob

On Jan 15, 2016, at 15:26, Robert Feldt notifications@github.com wrote:

Ah, I had not gotten "examples" correctly copied over (I had to NOT doc.install "example" in order to be able to prefix.install it). But yes, I also have to "sudo make build" after the brew install for it to be able to go through with the build in Pkg.test("Stan"). It's strange though for the first build seems to run ok and gives summaryplots etc:

Input observed data dictionary: 4-element Array{Dict{ASCIIString,Any},1}: Dict{ASCIIString,Any}("N"=>10,"y"=>[0,1,0,1,0,0,0,0,0,1]) Dict{ASCIIString,Any}("N"=>10,"y"=>[0,1,0,0,0,0,1,0,0,1]) Dict{ASCIIString,Any}("N"=>10,"y"=>[0,0,0,0,0,0,1,0,1,1]) Dict{ASCIIString,Any}("N"=>10,"y"=>[0,0,0,1,0,0,0,1,0,1])

--- Translating Stan model to C++ code --- bin/stanc /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan --o=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp Model name=bernoulli_model Input file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan Output file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

--- Linking C++ model --- g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256 -O3 -o /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli src/cmdstan/main.cpp -include /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

Inference for Stan model: bernoulli_model 4 chains: each with iter=(1200,1200,1200,1200); warmup=(0,0,0,0); thin=(1,1,1,1); 4800 iterations saved.

Warmup took (0.0070, 0.010, 0.0089, 0.012) seconds, 0.039 seconds total Sampling took (0.014, 0.023, 0.022, 0.015) seconds, 0.074 seconds total ... [many lines skipped] ... Dict{Any,Any} with 6 entries: :lp => [-11.8758] :finite_dif => [-4.82969] :var_id => [0] :error => [2.18072e-9] :value => [1.02429] :model => [-4.82969] File /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan will be updated.

--- Translating Stan model to C++ code --- bin/stanc /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan --o=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp Model name=bernoulli_model Input file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.stan Output file=/Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

--- Linking C++ model --- g++ -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I src -I stan_2.9.0/src -isystem stan_2.9.0/lib/stan_math_2.9.0/ -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/eigen_3.2.4 -isystem stan_2.9.0/lib/stan_math_2.9.0/lib/boost_1.58.0 -Wall -pipe -DEIGEN_NO_DEBUG -Wno-unused-function -ftemplate-depth-256 -O3 -o /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli src/cmdstan/main.cpp -include /Users/feldt/.julia/v0.4/Stan/Examples/Bernoulli/tmp/bernoulli.hpp

ErrorException("failed processes:\n Process(./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10000 random seed=-1 init=2 id=1 data file=bernoulli_1.data.R output file=bernoulli_variational_1.csv refresh=100, ProcessExited(64)) [64]\n Process(./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10000 random seed=-1 init=2 id=2 data file=bernoulli_2.data.R output file=bernoulli_variational_2.csv refresh=100, ProcessExited(64)) [64]\n Process(./bernoulli variational algorithm=meanfield grad_samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10000 random seed=-1 init=2 id=3 data file=bernoulli_3.data.R output file=bernoulli_variational_3.csv refresh=100, ProcessExited(64)) [64]\n Process(`./bernoulli variational algorithm=meanfie ld grad_ samples=1 elbo_samples=100 eta_adagrad=0.1 iter=10000 tol_rel_obj=0.01 eval_elbo=100 output_samples=10 — Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-172125160.

robertfeldt commented 8 years ago

Yep, that was it. Tests pass after Pkg.checkout as you suggested. I have one idea more to try and get around the sudo make. Will report back if it works.

robertfeldt commented 8 years ago

Yes, with this version of the homebrew formula I do not need to run sudo make:

https://github.com/robertfeldt/homebrew-science/blob/master/cmdstan.rb

It is not perfect though since it symlinks to many things as binaries. Not sure how to turn that option off when installing into bin dir in Homebrew formula. But things work after clean "brew install cmdstan" and then "Pkg.test("Stan")" for me now.

goedman commented 8 years ago

Hi Robert,

Indeed, this version seems to work well!! This is super!

Do you get below warning as well? Doesn’t seem to hurt though.

MacBook-Pro:~ rob$ brew uninstall --force cmdstan Uninstalling cmdstan... (19,288 files, 223.6M) MacBook-Pro:~ rob$ brew install cmdstan ==> Installing cmdstan from homebrew/science ==> Downloading https://github.com/stan-dev/cmdstan/releases/download/v2.9.0/cmd Already downloaded: /Library/Caches/Homebrew/cmdstan-2.9.0.tar.gz ==> make build Warning: tried to install empty array to /usr/local/Cellar/cmdstan/2.9.0/include/stan 🍺 /usr/local/Cellar/cmdstan/2.9.0: 19,284 files, 224.3M, built in 35 seconds MacBook-Pro:~ rob$

Exactly which are symlinked? Or do you mean they were symlinked in the expanded tar file?

My preference would be to stay as close as possible to how the Stan folks set up the tree, even if that means we’re copying something extra.

Next step would be to get the new .rb file accepted by the Homebrew folks, try it again. In the meantime I’ll update the README to mention this option and your work.

Regards, Rob

On Jan 15, 2016, at 16:27, Robert Feldt notifications@github.com wrote:

Yes, with this version of the homebrew formula I do not need to run sudo make:

https://github.com/robertfeldt/homebrew-science/blob/master/cmdstan.rb https://github.com/robertfeldt/homebrew-science/blob/master/cmdstan.rb It is not perfect though since it symlinks to many things as binaries. Not sure how to turn that option off when installing into bin dir in Homebrew formula. But things work after clean "brew install cmdstan" and then "Pkg.test("Stan")" for me now.

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-172135895.

robertfeldt commented 8 years ago

Yes, I got the warning. Now fixed the updated script to avoid it. Everything works as expected on my machine now and all tests pass. It still symlinks two things too many when installing but I have not found a way to avoid that. print and libstanc.a from the bin dir are symlinked to the main homebrew bin dir. This is a nuisance but not a big problem for now imho.

Longer-term I think it would be a nice touch to install a makestan command that one can run in a local dir with a stan model and then it runs the makefile from the cdmstan dir "behind the scenes" but that is for normal cmdstan use rather than for Stan.jl.

goedman commented 8 years ago

Robert,

On Jan 16, 2016, at 03:45, Robert Feldt notifications@github.com wrote:

Yes, I got the warning. Now fixed the updated script to avoid it. Everything works as expected on my machine now and all tests pass.

What caused that warning? It still symlinks two things too many when installing but I have not found a way to avoid that. print and libstanc.a from the bin dir are symlinked to the main homebrew bin dir. This is a nuisance but not a big problem for now imho.

Is on your system libstanc.a symlink-ed?

‘print’ is deprecated and will be removed in an upcoming release of Stan.

MacBook-Pro:2.9.0 rob$ pwd /usr/local/Cellar/cmdstan/2.9.0 MacBook-Pro:2.9.0 rob$ ls -lia bin total 27528 18636200 drwxr-xr-x 8 rob wheel 272 Jan 15 16:35 . 18636164 drwxr-xr-x 10 rob wheel 340 Jan 15 16:35 .. 18636174 drwxr-xr-x 5 rob wheel 170 Jan 15 16:35 cmdstan 18636198 -r--r--r-- 1 rob wheel 9130352 Jan 15 16:35 libstanc.a 18636195 -r-xr-xr-x 1 rob wheel 189544 Jan 15 16:35 print 18636175 drwxr-xr-x 3 rob wheel 102 Jan 15 16:35 stan 18636199 -r-xr-xr-x 1 rob wheel 4577512 Jan 15 16:35 stanc 18636194 -r-xr-xr-x 1 rob wheel 185256 Jan 15 16:35 stansummary

Longer-term I think it would be a nice touch to install a makestan command that one can run in a local dir with a stan model and then it runs the makefile from the cdmstan dir "behind the scenes" but that is for normal cmdstan use rather than for Stan.jl.

True. On the other hand, right now it works as explained in the cmdstan user manual.

Other ’nice to have’ topics are to make ‘brew test cmdstan’ indeed build the example and maybe create a bottle for El Capitan.

Rob

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-172192629.

robertfeldt commented 8 years ago

The warning was because

prefix.install "stan_2.9.0"

moves all of that dir so the (in the script) later

(include/"stan").install Dir["stan_2.9.0/lib/stan_math_*/stan/*"]

didn't match any files so was trying to install an empty array of file names. ;)

Yes, it symlinks the libstanc.a file and the print command:

feldt:~$ ls -al /usr/local/bin/libstanc.a
lrwxr-xr-x  1 feldt  admin  38 Jan 16 12:42 /usr/local/bin/libstanc.a -> ../Cellar/cmdstan/2.9.0/bin/libstanc.a
feldt:~$ ls -al /usr/local/bin/print
lrwxr-xr-x  1 feldt  admin  33 Jan 16 12:42 /usr/local/bin/print -> ../Cellar/cmdstan/2.9.0/bin/print

which is suboptimal. Well, well.

I'll look into the brew test command at some point but will have to check how to build a bottle. Not sure about that; doesn't their "bot" build the bottles automatically?

robertfeldt commented 8 years ago

I could create a bottle with "brew bottle cmdstan" which gives me:

feldt:~$ brew bottle cmdstan
==> Determining homebrew/science/cmdstan bottle revision...
==> Bottling cmdstan-2.9.0.el_capitan.bottle.tar.gz...
==> Downloading https://github.com/stan-dev/cmdstan/releases/download/v2.9.0/cmdstan-2.9.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmdstan-2.9.0.tar.gz
==> Detecting if cmdstan-2.9.0.el_capitan.bottle.tar.gz is relocatable...
./cmdstan-2.9.0.el_capitan.bottle.tar.gz
  bottle do
    cellar :any_skip_relocation
    sha256 "966729a5c2b9d1b710ca5bb73ffbb252c771cde4b5fdaaec70e58147a07af3e2" => :el_capitan
  end

but I'm not sure where to upload the bottle so others can use it. I guess their build bot needs to get to this at some point later. If you find out how, please tell me and we can do it.

goedman commented 8 years ago

Aah, that’s good to know. Slowly the components are falling in place!

Most Julia bottles were created by staticfloat (Elliot Saba) I believe, we could approach him.

The other aspect that is not 100% clear to me is how to activate Julia’s home-brew through Pkg.build(“Stan”) during Pkg.add(“Stan”) or Pkg.update().

Surely there are plenty examples among the existing Julia packages.

It depends a bit on how far we would like to go and what maintenance will be required given the fairly short amount of time between releases of Stan.

Rob

On Jan 16, 2016, at 13:39, Robert Feldt notifications@github.com wrote:

I could create a bottle with "brew bottle cmdstan" which gives me:

feldt:~$ brew bottle cmdstan ==> Determining homebrew/science/cmdstan bottle revision... ==> Bottling cmdstan-2.9.0.el_capitan.bottle.tar.gz... ==> Downloading https://github.com/stan-dev/cmdstan/releases/download/v2.9.0/cmdstan-2.9.0.tar.gz Already downloaded: /Library/Caches/Homebrew/cmdstan-2.9.0.tar.gz ==> Detecting if cmdstan-2.9.0.el_capitan.bottle.tar.gz is relocatable... ./cmdstan-2.9.0.el_capitan.bottle.tar.gz bottle do cellar :any_skip_relocation sha256 "966729a5c2b9d1b710ca5bb73ffbb252c771cde4b5fdaaec70e58147a07af3e2" => :el_capitan end but I'm not sure where to upload the bottle so others can use it. I guess their build bot needs to get to this at some point later. If you find out how, please tell me and we can do it.

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-172259879.

robertfeldt commented 8 years ago

Rob, I've had to do some slightly more complex changes to the make files in order to get the new formula into homebrew-science but we are making progress and Pkg.test("Stan") still runs fine:

https://github.com/Homebrew/homebrew-science/pull/3215#issuecomment-172293060

goedman commented 8 years ago

Hi Robert,

This looks pretty neat! Just tried the latest version of cmdstan.rb and it worked flawlessly!

Thanks a lot for all this work!

Rob

On Jan 17, 2016, at 13:43, Robert Feldt notifications@github.com wrote:

Rob, I've had to do some slightly more complex changes to the make files in order to get the new formula into homebrew-science but we are making progress and Pkg.test("Stan") still runs fine:

Homebrew/homebrew-science#3215 (comment) https://github.com/Homebrew/homebrew-science/pull/3215#issuecomment-172293060 — Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-172386028.

robertfeldt commented 8 years ago

Thanks, Rob! Latest version also fixes the test so one can do "brew test cmdstan" and it gives a concrete example of how to build a model "manually" (not relevant for Stan.jl though).

goedman commented 8 years ago

Yip, works great!

I’ve learned a lot by just following your progress!!

Regards, Rob

On Jan 17, 2016, at 14:32, Robert Feldt notifications@github.com wrote:

Thanks, Rob! Latest version also fixes the test so one can do "brew test cmdstan" and it gives a concrete example of how to build a model "manually" (not relevant for Stan.jl though).

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-172391339.

goedman commented 8 years ago

Hi Robert,

Is the next step approval of your pull request by Homebrew folks?

Regards, Rob

Sent from Rob Goedman's iPad Mini

On Jan 17, 2016, at 19:57, Rob J. Goedman goedman@icloud.com wrote:

Yip, works great!

I’ve learned a lot by just following your progress!!

Regards, Rob

On Jan 17, 2016, at 14:32, Robert Feldt notifications@github.com wrote:

Thanks, Rob! Latest version also fixes the test so one can do "brew test cmdstan" and it gives a concrete example of how to build a model "manually" (not relevant for Stan.jl though).

— Reply to this email directly or view it on GitHub.

robertfeldt commented 8 years ago

They just thanked me for my contributions and "submitted" it to their test bot to test and update the bottles so I think it should soon be done... :)

goedman commented 8 years ago

Hi Robert,

This morning, when I tried it, brew’s cmdstan formula clearly has been updated.

Just now I tried:

julia> Homebrew.add("cmdstan") ==> Installing cmdstan from homebrew/science ==> Installing dependencies for homebrew/science/cmdstan: boost, eigen ==> Installing homebrew/science/cmdstan dependency: boost ==> Downloading https://homebrew.bintray.com/bottles/boost-1.59.0.el_capitan.bottle.1.tar.gz ######################################################################## 100.0% ==> Pouring boost-1.59.0.el_capitan.bottle.1.tar.gz 🍺 /Users/rob/.julia/v0.4/Homebrew/deps/usr/Cellar/boost/1.59.0: 10,928 files, 429.2M ==> Installing homebrew/science/cmdstan dependency: eigen ==> Downloading https://homebrew.bintray.com/bottles/eigen-3.2.7.el_capitan.bottle.tar.gz ######################################################################## 100.0% ==> Pouring eigen-3.2.7.el_capitan.bottle.tar.gz 🍺 /Users/rob/.julia/v0.4/Homebrew/deps/usr/Cellar/eigen/3.2.7: 368 files, 3.5M ==> Installing homebrew/science/cmdstan ==> Downloading https://homebrew.bintray.com/bottles-science/cmdstan-2.9.0.el_capitan.bottle.tar.gz ######################################################################## 100.0% ==> Pouring cmdstan-2.9.0.el_capitan.bottle.tar.gz 🍺 /Users/rob/.julia/v0.4/Homebrew/deps/usr/Cellar/cmdstan/2.9.0: 19,284 files, 224.4M Warning: Already linked: /Users/rob/.julia/v0.4/Homebrew/deps/usr/Cellar/cmdstan/2.9.0

and pointed CMDSTAN_HOME to /Users/rob/.julia/v0.4/Homebrew/deps/usr/Cellar/cmdstan/2.9.0 and Pkg.test(“Stan”) worked flawlessly!!!!!

This is fantastic! I’ve been looking through Homebrew.jl to figure out how I can ‘automatically’ call Homebrew.add(“cmdstan”) when a user installs Stan.jl on OSX. I also wonder how Homebrew found out about the home-brew/science tap.

Regards, Rob

On Jan 20, 2016, at 23:01, Robert Feldt notifications@github.com wrote:

They just thanked me for my contributions and "submitted" it to their test bot to test and update the bottles so I think it should soon be done... :)

— Reply to this email directly or view it on GitHub https://github.com/goedman/Stan.jl/issues/18#issuecomment-173478657.

robertfeldt commented 8 years ago

Glad to hear my contribution made a difference. :) I'm not sure how things are connected/setup but apparently it is all automatic once your changes are included in homebrew's repos...

robertfeldt commented 8 years ago

And indeed the main cmdstan.rb formula:

https://github.com/Homebrew/homebrew-science/blob/master/cmdstan.rb

is now mine but updated with the bottle hashes. Nice automation...

robertfeldt commented 8 years ago

Rob, also see my post on stan-users:

https://groups.google.com/forum/#!topic/stan-users/BpTja1lGGXk