Skip to content

Change atomic_add to use reinterpret_cast for gridval - #1

Open
KhaledNabilSharafeldin wants to merge 2 commits into
llnl:mainfrom
KhaledNabilSharafeldin:bug/type_stall_atomicAdd
Open

Change atomic_add to use reinterpret_cast for gridval#1
KhaledNabilSharafeldin wants to merge 2 commits into
llnl:mainfrom
KhaledNabilSharafeldin:bug/type_stall_atomicAdd

Conversation

@KhaledNabilSharafeldin

Copy link
Copy Markdown

FFT gridval return complex, atomicAdd does not gracefully handle it on GPU (tested on LS40), resulting in a freeze with no obvious errors. A safe recast at final step to make sure type conforms resolves the issue.

FFT gridval return `complex`, `atomicAdd` which is not supported on GPU (tested on LS40), result is just a freeze. A safe recast at final step to make sure type conforms.
Safer, same operation as `reinterpret_cast<double*>`  which ignores the complex bits to minimize casting overhead.
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.

1 participant