SteveBronder / pathfinder_testing

Collection of stan-dev repo branches need to run pathfinder
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Collection of stan-dev repo branches needed to run pathfinder

Use the following commands to download and install this repo

git clone --recurse-submodules git@github.com:SteveBronder/pathfinder_testing.git
# if you don't have ssh enabled on your local git use the following
# git clone --recurse-submodules https://github.com/SteveBronder/pathfinder_testing.git
# make cmdstan
cd pathfinder_testing/cmdstan
echo "STAN_THREADS=true" > make/local
echo "O=3 -march=native -mtune=native" >> make/local
make -j24 build
cd ..
# Install branch of cmdstanr with the pathfinder in it
R -s -e "remotes::install_local(path = './cmdstanr', force = TRUE)"

If you have the necessary packages (listed below) the following script should run without error.

library(posteriordb)
library(ggplot2)
library(ggExtra)
library(data.table)
Rscript ./examples/posterior_db/posterior_db_ex.R

Hopefully, that should be it and you can then run the examples in this folder!

To update the repo when submodules have been updated just run

git submodule update --remote --merge --recursive