MeteoSwiss-APN / dawn

Compiler toolchain to enable generation of high-level DSLs for geophysical fluid dynamics models
MIT License
28 stars 30 forks source link

Extend Redcution Expression and Fill Statement to Allow Inclusion of Center #1081

Closed mroethlin closed 3 years ago

mroethlin commented 3 years ago

Technical Description

Some reductions in the ICON code that have the same start and end location include the center value in the reduction. This can not really be emulated with a trailing (or leading) additional operation if sparse dimensions are involved. That is, the entry for the central location in the sparse dimension would need to be extracted, involving manipulation of the memory of the sparse dimension, which we want to avoid. Hence, this PR:

Resolves / Enhances

Fixes issue #1000

Example

An example where this is needed can for example be found in mo_math_gradients.f90 in the function grad_green_gauss_cell_dycore

Testing

Quite a few tests have been added:

Unfortunately some things like the ico-cuda code generation have been tested manually only. The only way to inject this into the current CI would be icondusk-e2e, but dusk is currently not able to generate fields/reductions/loop statements including the center.

Dependencies

This PR is independent.

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins

mroethlin commented 3 years ago

launch jenkins