Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ./model info to obtain compile-time information #1010

Merged
merged 4 commits into from
May 18, 2021

Conversation

rok-cesnovar
Copy link
Member

Summary:

Closes #887

The idea explained in the issue is that

./examples/bernoulli/bernoulli info

would return:

stan_version_major = 2
stan_version_minor = 26
stan_version_patch = 1
STAN_OPENCL=false
STAN_THREADS=false
STAN_MPI=false
STAN_NO_RANGE_CHECKS=false
STAN_CPP_OPTIMS=false

There are all compile-time information about the built executable. Some of them could be obtained by running the model, others like STAN_CPP_OPTIMS, STAN_NO_RANGE_CHECKS would be harder to figure out.

Maybe we could also include other information, this is what came to mind for now. In order to get stanc flags we would need to instantiate the model and for that we need the data, so I opted not including that for now, but we could still do that at a later point.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Rok Češnovar

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.07 3.12 0.98 -1.61% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.96 -4.16% slower
eight_schools/eight_schools.stan 0.12 0.11 1.05 4.66% faster
gp_regr/gp_regr.stan 0.16 0.16 1.0 -0.11% slower
irt_2pl/irt_2pl.stan 6.0 5.93 1.01 1.28% faster
performance.compilation 89.5 87.54 1.02 2.19% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.63 8.85 0.98 -2.46% slower
pkpd/one_comp_mm_elim_abs.stan 29.12 28.94 1.01 0.63% faster
sir/sir.stan 123.63 124.02 1.0 -0.32% slower
gp_regr/gen_gp_data.stan 0.03 0.03 1.0 0.23% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.99 3.0 1.0 -0.44% slower
pkpd/sim_one_comp_mm_elim_abs.stan 0.39 0.4 0.98 -1.76% slower
arK/arK.stan 1.85 1.85 1.0 0.36% faster
arma/arma.stan 0.76 0.77 0.99 -1.3% slower
garch/garch.stan 0.58 0.61 0.96 -4.2% slower
Mean result: 0.99584617035

Jenkins Console Log
Blue Ocean
Commit hash: 1fdfb00


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.12 3.09 1.01 0.7% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.99 -0.74% slower
eight_schools/eight_schools.stan 0.11 0.11 1.0 -0.22% slower
gp_regr/gp_regr.stan 0.16 0.17 1.0 -0.38% slower
irt_2pl/irt_2pl.stan 6.01 6.07 0.99 -1.13% slower
performance.compilation 89.81 87.35 1.03 2.74% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.73 8.66 1.01 0.78% faster
pkpd/one_comp_mm_elim_abs.stan 30.7 31.29 0.98 -1.92% slower
sir/sir.stan 122.91 121.14 1.01 1.43% faster
gp_regr/gen_gp_data.stan 0.04 0.04 1.0 0.25% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 3.06 3.04 1.01 0.71% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.42 0.41 1.02 2.24% faster
arK/arK.stan 1.9 1.85 1.02 2.28% faster
arma/arma.stan 0.75 0.77 0.97 -3.08% slower
garch/garch.stan 0.57 0.61 0.95 -5.59% slower
Mean result: 0.99915125696

Jenkins Console Log
Blue Ocean
Commit hash: edd1d75


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@rok-cesnovar
Copy link
Member Author

Ready for review.

@rok-cesnovar rok-cesnovar mentioned this pull request May 16, 2021
20 tasks
@rok-cesnovar
Copy link
Member Author

Last call for reviews here as well. Thanks!

Copy link
Contributor

@SteveBronder SteveBronder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@rok-cesnovar rok-cesnovar merged commit da4be45 into develop May 18, 2021
@rok-cesnovar rok-cesnovar deleted the add_model_info branch May 18, 2021 19:40
@rok-cesnovar
Copy link
Member Author

rok-cesnovar commented May 18, 2021

Thanks Steve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ./model compile_info
3 participants