Skip to content

Instantly share code, notes, and snippets.

@mja
Created September 10, 2012 13:23
Show Gist options
  • Save mja/3690876 to your computer and use it in GitHub Desktop.
Save mja/3690876 to your computer and use it in GitHub Desktop.
Command line script for compiling .stan files
stanc schools.stan
stanmake schools_model.cpp schools
./schools data=8schools.rdump
STAN_HOME=$HOME/Applications/stan
export STAN_HOME
#!/bin/sh
clang++ -O3 -L$STAN_HOME/bin -I$STAN_HOME/src -I$STAN_HOME/lib/boost_1.51.0 -I$STAN_HOME/lib/eigen_3.1.1 -o $2 -lstan $1
#!/bin/sh
if [ -z $STAN_HOME ]
then export STAN_HOME=/usr/local/stan;
fi
g++ -O3 -L$STAN_HOME/bin -I$STAN_HOME/src -I$STAN_HOME/lib/boost_1.51.0 -I$STAN_HOME/lib/eigen_3.1.1 $1 -o $2 -lstan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment