Development branch CmdStan installation error


#1

I am trying to install the latest (develop) CmdStan and I am getting an error I don’t get with the 2.18 release – I am migrating from PyStan it would be extremely helpful to get json support which seems to be available only the latest version.
I used the master branch Stan and Stan Math repos and placed them where they are found on the 2.18 archive. I had no problems building the 2.18 version (with and without -jX flag) using a Debian Windows Subsystem for Linux (WSL, a.k.a. “bash on windows”, which for all command line purposes so far worked for me just like the real thing).
With the cmstan-develop repo I get the following error when building with make build -j8 (and get the same error line without the -j8 flag, but with less output).

g++    -c src/test/test-models/stanc.cpp -o test/test-models/stanc.o`
src/test/test-models/stanc.cpp:1:41: fatal error: stan/command/stanc_helper.hpp: No such file or directory #include <stan/command/stanc_helper.hpp>                                                                                                                       
                                                       ^
compilation terminated.                

The files and folder structure seem to be the same (unless I’m missing something). Are there any other steps I should take to build from the develop repos? Thanks


#2

I’m sure someone will give better answer, but I usually do

git clone --recursive https://github.com/stan-dev/cmdstan

And then

cd cmdstan

After that

make build -j8

Any way to retrieve the best fitting parameters for a failed optimizing?
#3

Nope. That’s a good answer.

If you’ve already cloned CmdStan, then from within the CmdStan repository:

git submodule update --init --recursive

will grab the required submodules.


#4

Just

make stan-update

will also grab those same submodules.


#5

I guess any answer that works well is a good answer.
Since we are here, I have a couple more questions:

  • is it straightforward to point out what generated that error when copying the Stan and Math repos separately into the interface and trying to build?

  • Parallel sampling with CmdStan doesn’t require anything other than running them in the background (is the -jN flag required? it’s not clear to me why that’d be), but is there any downside to that compared to using a specific interface like Python’s multiprocessing?

  • (also Threading or MPI are completely separate from that, which are for within-run threading-parallelization instead. All that is needed is to include the appropriate flags in make/local, right? )

I appreciate the responses so far. Despite not being as easy as using the interfaces, it’s being helpful to me to see what the C++ code is doing. Thanks.