-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use external assert library #172
Merged
Merged
Conversation
This file contains 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
This uses gasnett_fatalerror for process termination, for two reasosn: 1. prif_error_stop is impure and thus cannot be invoked by assert_error_stop 2. gasnett_fatalerror provides a variety of distributed-aware debugging services, such as automated backtracing and debugger attach points
This is a filthy hack that should be replaced with a user-controllable option
This ensures we get multi-image assertion capabilities, even for compilers that normally default to single-image (flang-new)
bonachea
force-pushed
the
assert-external
branch
from
January 14, 2025 03:42
68b5c9a
to
80e817d
Compare
This enables command-line control of assertions, eg: ``` env CPPFLAGS=-DASSERTIONS=0 install.sh ... ```
rouson
approved these changes
Jan 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks, @bonachea!
bonachea
added a commit
to bonachea/caffeine
that referenced
this pull request
Jan 17, 2025
This is a left-over from pull request BerkeleyLab#171 and BerkeleyLab#172 that was only possible to fully resolve now they are both merged.
bonachea
added a commit
to bonachea/caffeine
that referenced
this pull request
Jan 17, 2025
This is a left-over from pull request BerkeleyLab#171 and BerkeleyLab#172 that was only possible to fully resolve now they are both merged.
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.
This PR replaces Caffeine's internal use of the stub
prif:prif_private_s:caffeine_assert_s
submodule with the external berkeleylab/assert library.The main benefits of this upgrade:
characterizable_t
andintrinsic_array_t
Here is example
fpm test
output from a manually injected assertion failure:This PR notably utilizes the
ASSERT_PARALLEL_CALLBACKS
feature added in assert library version 2.0.1, which was added specifically for Caffeine's use case. This ensures:THIS_IMAGE()
parallel feature.ERROR STOP
parallel feature.Both of these are intended to break a dependency cycle, ensuring Caffeine's dependency on the assert library does not complicate builds for the compiler client by utilizing native parallel features, or result in an explicitly circular dependency back to the
prif
module.Finally, this PR enables control of assertion enforcement on the install.sh command line, eg:
the default remains assertions enabled while Caffeine development is still in a pre-production state.