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

Change assertion enforcement control knob to ASSERTIONS=1/0 #41

Merged
merged 7 commits into from
Oct 4, 2024

Conversation

bonachea
Copy link
Member

@bonachea bonachea commented Oct 3, 2024

This PR deploys a unified preprocessor control knob ASSERTIONS=1/0 to control all assertion calls.

When undefined, ASSERTIONS is given the default value of 0 (disabling assertions).

The first commit is cherry-picked from PR #31, and supersedes that PR.

rouson and others added 5 commits October 2, 2024 19:13
The DEBUG=def/undef macro control knob for the call_assert* macros
is renamed to ASSERTIONS, and changed to a non-zero/zero value convention.

When undefined, ASSERTIONS is given the default value of 0 (disabling
the call_assert macros).

Update test and example to match the new convention.
@bonachea bonachea marked this pull request as ready for review October 3, 2024 20:54
@bonachea bonachea requested a review from rouson October 3, 2024 20:54
gfortran's preprocessor is happy with a blank line break, but ifx
insists on a backslash (which gfortran also accepts).

So update recommended best practice to backslash continuation
@bonachea
Copy link
Member Author

bonachea commented Oct 3, 2024

In testing this PR I just noticed that CI is failing with ifx, pushing a fix in b6157fc

README.md Outdated Show resolved Hide resolved
src/assert/assert_subroutine_m.F90 Show resolved Hide resolved
Co-authored-by: Damian Rouson <[email protected]>
Copy link
Contributor

@rouson rouson left a comment

Choose a reason for hiding this comment

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

LGTM

@rouson rouson merged commit 6047dd8 into BerkeleyLab:main Oct 4, 2024
2 checks passed
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.

2 participants