Yes, that’s correct.
Technically possible, but I have seen segfaults in this configuration which may be possible to avoid, but I haven’t had the time to dig into this. I would not use this at the moment. I think the problems are related to MPI and threading implementations not harmonizing such that it should be possible to get it to work with the right MPI and compiler setup.
Not really. In any case, the MPI will take precedence over threading.
During compilation it only matters that you turn on the compiler flags which you list. The
STAN_NUM_THREADS is only relevant during runtime (so when you actually start your stan program)
You can put the
STAN_NUM_THREADS into you
.bashrc or set it when you start your stan program. So this also works on Linux with the Stan program foo:
# take what has been globally defined: ./foo ... # define STAN_NUM_THREADS for this run STAN_NUM_THREADS=16 ./foo
I hope this make it clear how to use it. Let me know if not.
What type of model are you using this on? I am just curious.