Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EOSPAC errors from calls in __host__ __device__ functions #421

Closed
jhp-lanl opened this issue Sep 27, 2024 · 2 comments · Fixed by #434
Closed

Fix EOSPAC errors from calls in __host__ __device__ functions #421

jhp-lanl opened this issue Sep 27, 2024 · 2 comments · Fixed by #434
Assignees
Labels
bug Something isn't working Robustness Ensures that existing features work as intended Testing Additions/changes to the testing infrastruture

Comments

@jhp-lanl
Copy link
Collaborator

We have been a bit lazy with our PORTABLE_INLINE_FUNCTION calls and EOSPAC. Since EOSPAC can't be called from within a device kernel, we need to get rid of those function decorators when calling EOSPAC.

For example,
https://github.com/lanl/singularity-eos/blob/main/singularity-eos/eos/eos_eospac.hpp#L1297

fails on certain platforms with the error error: reference to __host__ function 'eosSafeInterpolate' in __host__ __device__ function.

@jhp-lanl jhp-lanl added bug Something isn't working Testing Additions/changes to the testing infrastruture Robustness Ensures that existing features work as intended labels Sep 27, 2024
@Yurlungur
Copy link
Collaborator

The eospac functions need to be decorated as portable_function because of the variant. But we can implement an alternative approach to resolve this issue by clever application of preprocessor macros provided by device vendors that are only true on device.

@jhp-lanl
Copy link
Collaborator Author

Ahhhhh right... the function signature needs to be exactly the same. Sounds good!

@jhp-lanl jhp-lanl changed the title Don't call EOSPAC from device Fix EOSPAC errors from calls in __host__ __device__ functions Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Robustness Ensures that existing features work as intended Testing Additions/changes to the testing infrastruture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants