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

Pull back data to legacy structures on device #49

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

pmarguinaud
Copy link
Collaborator

ARPEGE/IFS field data are now encapsulated with Field API structures in the grid-point calculations; however, in the spectral calculations, these data are still represented by old GMV and GFL arrays.

This implies that we need to implement a fast mean of moving GFL/GMV back and forth between new Field API data structures and GMV/GFL arrays allocated on the device.

This PR implements such a mechanism, which is designed to be flexible enough to be compatible with a traversal of large data structures such as YDVARS.

The test case test_legacy.F90 illustrates this mechanism.

Copy link
Collaborator

@awnawab awnawab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pmarguinaud. Enabling FIELD_API to work with legacy/manually offloaded code is a much needed and extremely welcome feature addition. It is also very well timed, as we are looking to soon integrate offloaded ecTrans with offloaded ecPhys. Many many thanks 🙌

!$acc end kernels

!$acc enter data create (GMV)
!$acc update device (GMV)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[no action] Since GMV has been allocated by the time we get here, we can simply do !$acc enter data copyin.

@awnawab awnawab merged commit 50ed12b into ecmwf-ifs:main Jun 3, 2024
4 checks passed
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.

2 participants