Skip to content

Fix GH issue 203 - uncaught exception in OpenMP#204

Merged
scal444 merged 2 commits into
NVIDIA-BioNeMo:mainfrom
scal444:fix_gh_203
Jun 12, 2026
Merged

Fix GH issue 203 - uncaught exception in OpenMP#204
scal444 merged 2 commits into
NVIDIA-BioNeMo:mainfrom
scal444:fix_gh_203

Conversation

@scal444

@scal444 scal444 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

We needed to catch and rethrow outside the openmp loop. Fixes #203

…cessing

buildQueryBatchParallel ran addQueryToBatch inside an OpenMP parallel region.
The validation error for fragment (disconnected) queries escaped the region and
called std::terminate whenever more than one preprocessing thread was used, so
the error only surfaced as a RuntimeError on the single-threaded path. Capture
the first exception with OpenMPExceptionRegistry and rethrow once the region
joins.
@scal444 scal444 requested a review from evasnow1992 June 11, 2026 21:05
@scal444 scal444 self-assigned this Jun 11, 2026
# Conflicts:
#	src/substruct/molecules.cpp

@evasnow1992 evasnow1992 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.

Thank you for fixing this. The current changes look good to me. We may, however, have similar issues elsewhere in molecules.cpp, such as around lines 2078–2086. It might be worth doing a quick scan with follow-up PRs if any related cases are found.

@scal444 scal444 merged commit 6f967ed into NVIDIA-BioNeMo:main Jun 12, 2026
9 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.

hasSubstuctMatch kernel crash with disconnected SMARTS

2 participants