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

Add ASSERT_PARALLEL_CALLBACKS define #51

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

bonachea
Copy link
Member

@bonachea bonachea commented Jan 9, 2025

By default, assert uses THIS_IMAGE() in multi-image mode while composing assertion output, and invokes ERROR STOP to print the assertion and terminate execution.

The ASSERT_PARALLEL_CALLBACKS preprocessor flag enables the client to replace the default use of these two Fortran features with client-provided callbacks. To use this feature, the client must build the library with -DASSERT_PARALLEL_CALLBACKS, and then at startup set the assert_this_image and assert_error_stop procedure pointers to reference the desired callbacks.

By default, assert uses `THIS_IMAGE()` in multi-image mode while
composing assertion output, and invokes `ERROR STOP` to print the
assertion and terminate execution.

The ASSERT_PARALLEL_CALLBACKS preprocessor flag enables the client to replace
the default use of these two Fortran features with client-provided callbacks.
To use this feature, the client must build the library with `-DASSERT_PARALLEL_CALLBACKS`,
and then at startup set the `assert_this_image` and `assert_error_stop`
procedure pointers to reference the desired callbacks.
@bonachea bonachea marked this pull request as ready for review January 9, 2025 03:51
@bonachea bonachea requested a review from rouson January 9, 2025 03:51
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 52e14b2 into BerkeleyLab:main Jan 9, 2025
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