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

accessing Fortran global variables in target subroutine #561

Closed
changliu777 opened this issue Jun 7, 2023 · 1 comment
Closed

accessing Fortran global variables in target subroutine #561

changliu777 opened this issue Jun 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@changliu777
Copy link

changliu777 commented Jun 7, 2023

I am trying to locate a bug in my Fortran 90 code using OpenMP Offloading. I found that the issue seems to be related to the implementation in AOMP. When I try to access a global variable defined in a module, inside a subroutine which has been declared as omp declare target, it always return 0.

This global variable has been declared as omp declare target to, and has been updated from host to device. If I access it in the main kernel it returns the correct value. But accessing it in target subroutine gives the wrong one. The only way to access it is to pass it as a argument.

I wonder if it is a known bug in AOMP, or is there a workaround.

@gregrodgers gregrodgers added the bug Something isn't working label Jul 18, 2023
@gregrodgers
Copy link
Contributor

Please read issue #576 about the status of flang in AOMP and ROCm. The current flang-legacy is not considered production for offloading (target offload) to GPUs.

Can you create a short reproducer for us to add to our testing in both current flang-legacy and future flang-new (llvm flang)?

This could be a problem with setting link and/or visibility attributes.

@ppanchad-amd ppanchad-amd closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 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
Projects
None yet
Development

No branches or pull requests

3 participants