Cmdstanr: constructing mod object using C++ file

@rok_cesnovar Everything should be working fine now! This job is running for branch try-laplace_approximation.

2 Likes

Thanks!! That was fast :)

I’m getting an issue with the new function I want to expose (laplace_approx_bernoulli_rng), so I may have done something wrong. Here are my steps:

  1. build the binaries using Jenkins which gives run #48
  2. in cmdStan/make/stanc edit the following line: STANC3_TEST_BIN_URL=https://jenkins.mc-stan.org/job/stanc3-test-binaries/48/artifact
  3. In cmdstan, run make build

However, the Stan file I need fails to compile. It does however work on my mac where I build the binaries using dune.

Does this work?

STANC3_TEST_BIN_URL=https://jenkins.mc-stan.org/job/stanc3-test-binaries/44/artifact

If it does then the build for branches is not working correctly, otherwise we need to have a deeper look.

This didn’t quite work (it was the first thing I tried).

It exposed the laplace_marginal_bernoulli function that was already there, but the not the new rng, laplace_approx_bernoulli_rng function that I added. So part of it was built correctly. I’m wondering if you built an old version? That, or the cluster simply used the binaries that were already there and didn’t download the updated binaries.

I built whatever is on the branch, see

Trying again now here https://jenkins.mc-stan.org/job/stanc3-test-binaries/49/

Thank you for all the help.

When I run make build on cmdStan, it simply states that the software is built. How can I force it to rebuild the binaries, even if there are already some binaries there? It did rebuild when I tried yesterday for the first time – I’m guessing it build the Windows and Mac binaries, but didn’t rebuilt the linux binaries. Which would explain the observed behavior.

Glad to help. You are doing awesome work and would like to see this in action :)

Try running rm bin/stanc and then make build.

Great, the file compiles! So it was a matter of making sure it rebuilt the linux binary file. Thank you all for your help!

1 Like