Skip to content

Add assertions along all PRIF entry points that prif_init has been called#341

Merged
bonachea merged 1 commit into
BerkeleyLab:mainfrom
bonachea:check-init
Jul 8, 2026
Merged

Add assertions along all PRIF entry points that prif_init has been called#341
bonachea merged 1 commit into
BerkeleyLab:mainfrom
bonachea:check-init

Conversation

@bonachea

@bonachea bonachea commented Jul 8, 2026

Copy link
Copy Markdown
Member

Many PRIF entry points begin with a call to internal helpers team_check or coarray_handle_check, so new assertions there cover a large fraction of the public entry points.

The rest are covered by strategic insertion of assertions near the entry point.

prif_init_called_previously is promoted to a module-level internal symbol to enable these assertions, and a new variable local to prif_init is used to detect potential discrepancies from memory corruption.

…lled

Many PRIF entry points begin with a call to internal helpers `team_check` or
`coarray_handle_check`, so new assertions there cover a large fraction of the
public entry points.

The rest are covered by strategic insertion of assertions near the entry point.

`prif_init_called_previously` is promoted to a module-level internal symbol
to enable these assertions, and a new variable local to `prif_init` is used to
detect potential discrepancies from memory corruption.

@ktras ktras left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@bonachea bonachea removed the request for review from everythingfunctional July 8, 2026 22:26
@bonachea bonachea merged commit 629e593 into BerkeleyLab:main Jul 8, 2026
54 checks passed
@bonachea bonachea deleted the check-init branch July 8, 2026 23:02
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