Repository navigation
Add cmake as the default for building stan math's tests - #3463
Open
SteveBronder wants to merge 4 commits into
Open
SteveBronder wants to merge 4 commits into
SteveBronder wants to merge 4 commits into
Conversation
Import and modernize the CMake setup for current vendored dependencies. Use CMake by default in runTests.py, group directory tests into executables, reuse per-source objects and PCH, and cap build parallelism at six jobs. Migrate Jenkins test stages, document the workflow, and ignore CMake build trees. Fix shared test helper linkage, Eigen fixture initialization, and the Bernoulli GLM invalid-label fixture; suppress GCC column-tracking notes. Validation: 21 runner, selection, and CMake build regression checks passed. Previously validated reverse and primitive function groups, generated probability and expression tests, and object reuse across test selections.
Collaborator
Author
|
Note this is not ready for a review yet. I think once all of the jenkins passes it will be good to look at |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is my new take on having a cmake scheme. It imports a lot of what I did in #3068. This is the nth time we have attempted to make a cmake scheme for our build setup, but this time, I feel good about it! I've made many smaller PRs to try to get the math library ready for this, so now instead of 100k+ changes we have about 1K+ changes.
Since this is rather new for stan developers the readme.md has a big intro for how to use the new cmake backend. After a few releases I will put that in the normal docs page. But while we are moving to using this new tool I think it is better we are very verbose in showing people how to use it.
Tests
./runTests.pyand jenkins now use the cmake backend.The cmake creates folder level test executables and individual test executables.
The folder level tests are much faster to compile now. For example the
test/unit/math/mix/funtests all compile into one object file which took about 30 minutes on my machine using 24 cores (and at max about 65 gb of memory). On develop these take about an hour and a half on my machine.Side Effects
Yes. I mean this is a pretty big change.
One really nice change is that we have precompiled headers with this. That should speed up test compilation. In another PR I am planning to do some tricks with the distribution tests which should speed compilation for those by a good bit.
Release notes
Add cmake as the build backend
Checklist
Copyright holder: Simons Foundation
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit)make test-headers)make test-math-dependencies)make doxygen)make cpplint)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested