Skip to content

Commit

Permalink
Rel 8.0.3 - Updated docs for new env variable CMDSTAN
Browse files Browse the repository at this point in the history
  • Loading branch information
goedman committed Dec 4, 2021
1 parent ed8518e commit e3702ef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ Stan.jl v7.x constitutes the third generation and covers all of cmdstan's method

Stan.jl v8.0 is based on StanSample.jl v5, StanOptimize.jl v3 and StanQuap.jl v2.

Note: Future versions of the StanJulia packages, in particular StanSample.jl v5.1, will start to support multithreading in the `cmdstan` binary and will require cmdstan v2.28.1 and up.

My intention is to continue maintenance of CmdStan.jl at least until late 2021.

## Requirements

Stan's cmdstan executable needs to be installed separatedly. Please see [cmdstan installation](https://stanjulia.github.io/Stan.jl/latest/INSTALLATION/).
Expand All @@ -42,7 +38,9 @@ For more info on Stan, please go to <http://mc-stan.org>.

### Version 8.0.0


1. Supports both CMDSTAN and JULIA_CMDSTAN_HOME environment variables to point to the cmdstan installation.
2. Thanks to @jfb-h completed testing with using conda to install cmdstan
3. Refactored code between StanBase.jl and the other StanJulia packages.

### Version 7.1.1

Expand Down
13 changes: 6 additions & 7 deletions docs/src/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ To install Stan.jl e.g. in the Julia REPL: `] add Stan`.

To run this version of the Stan.jl package on your local machine, it assumes that the [cmdstan](http://mc-stan.org/interfaces/cmdstan) executable is properly installed.

In order for Stan.jl to find the cmdstan you need to set the environment variable `JULIA_CMDSTAN_HOME` to point to the cmdstan directory, e.g. add
In order for Stan.jl to find the cmdstan you need to set the environment variable `CMDSTAN` (or `JULIA_CMDSTAN_HOME`) to point to the cmdstan directory, e.g. add

```
export JULIA_CMDSTAN_HOME=/Users/rob/Projects/Stan/cmdstan
launchctl setenv JULIA_CMDSTAN_HOME /Users/rob/Projects/Stan/cmdstan # Mac specific
export CMDSTAN=/Users/rob/Projects/Stan/cmdstan
launchctl setenv CMDSTAN /Users/rob/Projects/Stan/cmdstan # Mac specific
```

to your `~/.zshrc` or `~/.bash_profile` or simply add

```
ENV["JULIA_CMDSTAN_HOME"]="_your absolute path to cmdstan_"
ENV["CMDSTAN"]="_your absolute path to cmdstan_"
```

to `./julia/config/startup.jl`. Remember to use `expanduser()` if you use `~` in above "path to cmdstan" if it is not absolute.

I typically prefer cmdstan not to include the cmdstan version number in the above path to cmdstan (no update needed when the cmdstan version is updated).

Currently tested with cmdstan 2.28.1.
Currently tested with cmdstan 2.28.2.

Note: Future versions of the StanJulia packages, in particular StanSample.jl v5.1, will start to support multithreading in the `cmdstan` binary and will require cmdstan v2.28.1 and up.
Note: Future versions of the StanJulia packages, in particular StanSample.jl v5.1, will start to support multithreading in the `cmdstan` binary and will require cmdstan v2.28.2 and up.
6 changes: 3 additions & 3 deletions docs/src/VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ This version of the package has primarily been tested with GitHub workflows and

1. Change the default output format returned by read_samples to :table.
2. Keyword based cmdline modification.
3. Dropped dependency on StanBase.
3. Refactored code between StanBase.jl and the other StanJulia packages.
4. Will need cmdstan 2.28.1 (for num_threads).
5. `tmpdir` now positional argument when creating a CmdStanModel.

Note: StanVariational.jl and StanDiagnose.jl have not yet been updated to use keywords in the `stan_variational()` and `stan_diagnose()` calls. They still depend on StanBase.jl.
6. Supports both CMDSTAN and JULIA_CMDSTAN_HOME environment variables to point to the cmdstan installation (for compatibility between cmdstan for R and Python).
7. Thanks to @jfb-h completed testing with using conda to install cmdstan

### Version 7.0

Expand Down
2 changes: 1 addition & 1 deletion src/Stan.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Stan

using StanSample, StanOptimize, StanDiagnose, StanVariational
using StanSample, StanOptimize, StanDiagnose, StanVariational, StanQuap

end # module

0 comments on commit e3702ef

Please sign in to comment.