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

adds compile_info make target #708

Merged
merged 2 commits into from
Jun 3, 2019
Merged

Conversation

syclik
Copy link
Member

@syclik syclik commented May 30, 2019

Submisison Checklist

  • Run tests: ./runCmdStanTests.py src/test
  • Declare copyright holder and open-source license: see below

Summary:

Adds make compile_info. It will print the C++ compiler invocation to be used (without the -include <stan generated header file> -o <executable name>).

Intended Effect:

Makes it easier to compile CmdStan programs. This will allow for spaces in paths by scripting outside of make.

How to Verify:

Type:

make compile_info

Side Effects:

None.

Documentation:

Added some doc to make help-dev

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):

Generable

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

@stan-buildbot
Copy link
Contributor

(stat_comp_benchmarks/benchmarks/gp_pois_regr/gp_pois_regr.stan, 1.0)
(stat_comp_benchmarks/benchmarks/low_dim_corr_gauss/low_dim_corr_gauss.stan, 1.01)
(stat_comp_benchmarks/benchmarks/irt_2pl/irt_2pl.stan, 1.0)
(stat_comp_benchmarks/benchmarks/pkpd/one_comp_mm_elim_abs.stan, 1.0)
(stat_comp_benchmarks/benchmarks/eight_schools/eight_schools.stan, 1.03)
(stat_comp_benchmarks/benchmarks/gp_regr/gp_regr.stan, 0.98)
(stat_comp_benchmarks/benchmarks/arK/arK.stan, 1.01)
(performance.compilation, 1.0)
(stat_comp_benchmarks/benchmarks/low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan, 1.0)
(stat_comp_benchmarks/benchmarks/low_dim_gauss_mix/low_dim_gauss_mix.stan, 1.0)
(stat_comp_benchmarks/benchmarks/sir/sir.stan, 0.97)
(stat_comp_benchmarks/benchmarks/pkpd/sim_one_comp_mm_elim_abs.stan, 1.15)
(stat_comp_benchmarks/benchmarks/garch/garch.stan, 1.0)
(stat_comp_benchmarks/benchmarks/gp_regr/gen_gp_data.stan, 1.0)
(stat_comp_benchmarks/benchmarks/arma/arma.stan, 1.0)
Result: Regex did not match anything
Commit hash: 104b763

@mitzimorris
Copy link
Member

need to spit out absolute paths, otherwise the problem remains: compile command must be called from CmdStan directory, because compiler directive uses relative paths.

here's output from my machine:

~/github/stan-dev/cmdstan (develop)> make compile_info
clang++ -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare      -O3 -I src -I stan/src -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.69.0 -I stan/lib/stan_math/lib/sundials_4.1.0/include    -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION            -include-pch stan/src/stan/model/model_header.hpp.gch src/cmdstan/main.cpp        stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_idas.a 

@mitzimorris
Copy link
Member

revising previous comment - this might be useful for CmdStanPy.

@syclik
Copy link
Member Author

syclik commented May 30, 2019 via email

@mitzimorris
Copy link
Member

yes, this makes sense.

@mitzimorris mitzimorris merged commit 1661d06 into develop Jun 3, 2019
@serban-nicusor-toptal serban-nicusor-toptal added this to the 2.20.0 milestone Jul 18, 2019
@mitzimorris mitzimorris deleted the feature/issue-707-compile_info branch January 21, 2020 16:26
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.

4 participants