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

Model globals in the API produced by cuda-ico #1042

Closed
Stagno opened this issue Oct 14, 2020 · 0 comments · Fixed by #1089
Closed

Model globals in the API produced by cuda-ico #1042

Stagno opened this issue Oct 14, 2020 · 0 comments · Fixed by #1089

Comments

@Stagno
Copy link
Contributor

Stagno commented Oct 14, 2020

So that they can be used from ICON's driver code

mroethlin added a commit that referenced this issue Jan 18, 2021
…1089)

## Technical Description

Currently, temporary fields are allocated in the constructor of the generated class. Since the API functions to the FORTRAN and cpp drivers hold the stencil on the stack, this leads to memory (de-)allocation on each call. This is fine for debugging, but not for production runs. Thus, this PR keeps that behavior for the convenience wrappers starting from host memory, but introduces static `setup` and `free` functions which have to be called by the host when using the production interface which assumes device pointers. 

Additionally, since the APIs are touched either way, globals can now be communicated from FORTRAN to the CUDA backend. 

Furthermore this PR contains a small refactoring and removes the (now) superfluous template parameter from the generated stencil class

### Resolves / Enhances

Addresses part of #1038 
Fixes #1042
### Testing

Since this affects the CUDA-ico backend this is tested by `icondusk-e2e`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant