-
-
Notifications
You must be signed in to change notification settings - Fork 41
Valgrind CI check #909
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
Open
schnellerhase
wants to merge
14
commits into
FEniCS:main
Choose a base branch
from
schnellerhase:valgrind
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Valgrind CI check #909
Conversation
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
036e176
to
98d2965
Compare
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.
Adds a
valgrind
check to the CI.First step to resolve FEniCS/dolfinx#1355
There are two main options to execute
valgrind
in a Python contextPYTHONMALLOC=malloc
to allow forvalgrind
to properly track allocations (the approach used in the pybind11 PR linked by the issue), or--with-valgrind
.Option 1 is very easy to setup (no custom Python install necessary) however the runtime gets out of hand and does not allow to reasonably check all test cases. Option 2 is the one chosen here and allows to execute all tests in a reasonable execution time.
Performance is still far from great, possibly a large speed up can be gained if the test cases are further split up into batches. In the current setup the whole
pytest test/
run is a singlevalgrind
call - this collects overhead during execution.Note: Python is configured without
-enable-optimizations --with-lto
as recommended - while setting the optimization flags reduces the test execution runtime drastically the additional compile time of Python is not worth the gain here.Note: Leak kind choice of
definite,indirect
is not driven by any observation, can be configured further as seen fit.