What is known about how the model's executable was built
Source:R/model.R
model-method-build_info.RdThe $build_info() method of a CmdStanModel object
calls stan_build_info() on the model's executable. See that page for
what the result holds. The method reports on the executable as it is
now, so it also works on a model whose executable was replaced or whose
build record is gone.
This method is different from the $cpp_options() method, which answers a
narrower question: the C++ options this model object was created with.
$build_info() describes the executable itself, including what it reports
about its own build when run. Take a model created with
cmdstan_model(exe_file = ) from an executable with no build record:
$cpp_options() is empty, since no options were given, but $build_info()
still reports whether the executable was built with threading, OpenCL and
so on.
Value
See stan_build_info().
See also
The CmdStanR website (mc-stan.org/cmdstanr) for online documentation and tutorials.
The Stan and CmdStan documentation:
Stan documentation: mc-stan.org/users/documentation
CmdStan User’s Guide: mc-stan.org/docs/cmdstan-guide
Other CmdStanModel methods:
model-method-check_syntax,
model-method-cmdstan_defaults,
model-method-diagnose,
model-method-expose_functions,
model-method-format,
model-method-generate-quantities,
model-method-is_current,
model-method-laplace,
model-method-model-info,
model-method-optimize,
model-method-pathfinder,
model-method-sample,
model-method-sample_mpi,
model-method-variables,
model-method-variational
Examples
# \dontrun{
mod <- cmdstan_model(
file.path(cmdstan_path(), "examples/bernoulli/bernoulli.stan"),
cpp_options = list(stan_threads = TRUE)
)
info <- mod$build_info()
info
#> Build record: available
#> Reported features:
#> stan_threads: TRUE
#> stan_mpi: FALSE
#> stan_opencl: FALSE
#> stan_no_range_checks: FALSE
#> stan_version: 2.40.0
#> Configuration:
#> cpp_options: STAN_THREADS=true
#> stanc_options: none
#> stanc_options_from_make: none
#> include_paths: none
#> Dependencies:
#> stan_file: /home/runner/.cmdstan/cmdstan-2.40.0/examples/bernoulli/bernoulli.stan
#> make_local: /home/runner/.cmdstan/cmdstan-2.40.0/make/local
#> CmdStan 2.40.0 at /home/runner/.cmdstan/cmdstan-2.40.0
info$reported_features$stan_threads
#> [1] TRUE
# }