stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
103 stars 25 forks source link

[PSyIR] Add support for reduction clauses on parallel directives #514

Open hiker opened 4 years ago

hiker commented 4 years ago

This extends #512. Reductions and 'omp parallel do' are not needed for my ROMS work, but it would complete the omp directive support in PSyIR, so I opened a separate issue for this.

arporter commented 7 months ago

At some point since this was opened, we have added support for OMPParallelDoDirective. However, support for reductions is still required. @jwallwork23 says:

In the latest version of our PSyclone-driven OpenACC GPU port, reduction loops get loop seq. Performance is improved significantly if these are manually edited to instead use loop independent reduction(...). Would it be possible to support reduction clauses in PSyclone?

arporter commented 4 months ago

Alan Hewitt at the Met Office seems to have taken up the UKCA torch and is also asking about OpenACC reductions. Could be a good one for @hiker or @LonelyCat124 to take on perhaps?

arporter commented 1 month ago

Could be a duplicate of #1812 and #2446?

LonelyCat124 commented 1 month ago

I think not quite duplicate of #1812 is more an issue on how we declare reductions (as clause objects instead of strings which current reductions are).

This issue is in theory discussing OMPParallelDoDirectives (i think? Its not totally clear) vs #2446 focusing GPU directives - I think what we need for those directives is the same so its close enough to duplicate (though 2446 extends the behaviour to support atomics).