Skip to content

Fix GPU_HOST_DATA and GPU_DECLARE argument handling - #1999

Closed
sbryngelson wants to merge 3 commits into
MFlowCode:masterfrom
sbryngelson:fix/gpu-macro-args
Closed

sbryngelson wants to merge 3 commits into
MFlowCode:masterfrom
sbryngelson:fix/gpu-macro-args

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

GPU_HOST_DATA with both use_device_addr and use_device_ptr tried to
assign into a Python string, which fails at Fypp time. Join the two
bracketed lists into one instead.

GPU_DECLARE passed extraAccArgs=None to ACC_DECLARE, silently dropping
the caller's value. Pass it through.

Verified with Fypp: a scratch file using both macros now expands to
'!$acc host_data use_device(a, b, c)' / '!$omp target data
use_device_addr(a, b) use_device_ptr(c)' and keeps extraAccArgs on
'!$acc declare'. Fypp output for every pre_process, simulation,
post_process and common source is byte-identical before and after for
MFC_COMPILER = NVHPC, LLVMFlang and Cray, since no existing call site
uses either path.

GPU_HOST_DATA with both use_device_addr and use_device_ptr tried to
assign into a Python string, which fails at Fypp time. Join the two
bracketed lists into one instead.

GPU_DECLARE passed extraAccArgs=None to ACC_DECLARE, silently dropping
the caller's value. Pass it through.

Verified with Fypp: a scratch file using both macros now expands to
'!$acc host_data use_device(a, b, c)' / '!$omp target data
use_device_addr(a, b) use_device_ptr(c)' and keeps extraAccArgs on
'!$acc declare'. Fypp output for every pre_process, simulation,
post_process and common source is byte-identical before and after for
MFC_COMPILER = NVHPC, LLVMFlang and Cray, since no existing call site
uses either path.
@github-actions

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/common/include/parallel_macros.fpp 248 -3
Directory Lines Diff
common 10475 -3
total 47511 -3

@sbryngelson

Copy link
Copy Markdown
Member Author

Closing this for now to bring the number of open PRs from me down to four, so the ones that stay open get real review attention rather than being lost in a queue of 35.

No work is lost and nothing needs re-doing. The branch fix/gpu-macro-args remains on the fork at 9573d9edcc, this PR's diff and discussion stay here, and the head commit is additionally archived in a local verified bundle. Reopening takes no force-push and no rebase:

gh pr reopen 1999 -R MFlowCode/MFC

I intend to reopen these in small batches as the open slots free up. Apologies for the notification noise.

Opened and closed with Claude Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant