Skip to contents

The $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.

Usage

build_info()

Value

See stan_build_info().

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
# }