Skip to content

Workaround for Hipcc error (reference to host function in host device function)#1754

Merged
franzpoeschel merged 2 commits intoopenPMD:devfrom
franzpoeschel:fix-hipcc-compiler-bug
May 12, 2025
Merged

Workaround for Hipcc error (reference to host function in host device function)#1754
franzpoeschel merged 2 commits intoopenPMD:devfrom
franzpoeschel:fix-hipcc-compiler-bug

Conversation

@franzpoeschel
Copy link
Copy Markdown
Contributor

Observed on Frontier:

/ccs/home/fpoeschel/git-repos/openPMD-api/src/snapshots/RandomAccessIterator.cpp:13:35: error: reference to __host__ function '~AbstractSeriesIterator' in _
_host__ __device__ function                                                                                                                                 
   13 | RandomAccessIterator<iterator_t>::RandomAccessIterator(

/ccs/home/fpoeschel/git-repos/openPMD-api/src/snapshots/RandomAccessIterator.cpp:16:35: error: reference to __host__ function '~AbstractSeriesIterator' in _
_host__ __device__ function                                                                                                                                 
   16 | RandomAccessIterator<iterator_t>::RandomAccessIterator(

These look like compiler bugs to me. Since this is an internal header, we can move the defaulted implementation to the header file without trouble. This fixes the observed error.

@franzpoeschel franzpoeschel merged commit 257cf87 into openPMD:dev May 12, 2025
30 checks passed
franzpoeschel added a commit to franzpoeschel/openPMD-api that referenced this pull request Nov 6, 2025
@ax3l
Copy link
Copy Markdown
Member

ax3l commented Nov 10, 2025

@franzpoeschel what ROCm version and hipcc/amdclang++ version are these issues with?

franzpoeschel added a commit to franzpoeschel/openPMD-api that referenced this pull request Nov 21, 2025
ax3l pushed a commit that referenced this pull request Dec 2, 2025
* Revert "Workaround for Hipcc error (reference to host function in host device function) (#1754)"

This reverts commit 257cf87.

* Add `__host__` directives where needed
* Annotate Compiler & Issue Number
* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants