Skip to content

Fix GPU_HOST_DATA and GPU_DECLARE argument handling - #1999

Draft
sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:fix/gpu-macro-args
Draft

sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:fix/gpu-macro-args

Conversation

@sbryngelson

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.


Acknowledgement

  • I confirm this PR meets the above expectations and reflects my own understanding and real-world context.

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 10445 -3
total 47423 -3

This branch has not been deployed

No deployments
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