Skip to content

cuda: avoid unreachable loop in host throw macros - #5293

Merged
akva2 merged 1 commit into
OPM:masterfrom
akva2:janitoring_nvcc_no_macro_block_idiom
Aug 20, 2026
Merged

cuda: avoid unreachable loop in host throw macros#5293
akva2 merged 1 commit into
OPM:masterfrom
akva2:janitoring_nvcc_no_macro_block_idiom

Conversation

@akva2

@akva2 akva2 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Sadly, nvcc is a d and throws a Warning #128-D: unreachable loop when it encounters the macro-block idiom. As broad suppression of this warning is not very nice, this takes another approach and crafts different macros for when building with nvcc.

This gets rid of the warning, at a cost of generating some other warnings from the cpu side compiler (sigh). Those need to be addressed in separate PRs, which, while independent as such, I'll cite as downstreams of this since they are related.

@akva2

akva2 commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-grid=1062 opm-simulators=7325 please

@multitalentloes multitalentloes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This changes the macros only when compiling a CPU function from the CUDA / HIP compilers and should not cause any functional changes.

Change looks good to me and build is green, but I cannot actually access the jenkins build myself and see that that the errors were removed, not sure why.

@akva2

akva2 commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

build is too old, we only retain 10 builds for space reasons.

@akva2

akva2 commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-grid=1062 opm-simulators=7325 please

@akva2
akva2 merged commit 144ca9f into OPM:master Aug 20, 2026
3 checks passed
@akva2
akva2 deleted the janitoring_nvcc_no_macro_block_idiom branch August 20, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants