Currently Module-inline fails the validation for subroutines that contain references to other callee scope symbols.
There are 2 solutions to this:
- Add imports in the caller scope to these symbols (but this only works if they are public)
- Localise all the symbols inside the module-inlined routine. E.g. copying if it is a parameter, or in-lining it if it is a call to a subroutine.
This is the GPU bottleneck in the timesteping region after annotating the LFRic infrastructure:
! Transformation Error: Cannot apply KernelModuleInlineTrans to Kernel 'ffsl_flux_xy_panel_remap_code' because it accesses data
!& from its outer scope: PSyclone SymbolTable error: Kernel 'ffsl_flux_xy_panel_remap_code' contains accesses to
!& 'ffsl_flux_xy_panel_remap_1d' which is declared in the callee module scope.
Currently Module-inline fails the validation for subroutines that contain references to other callee scope symbols.
There are 2 solutions to this:
This is the GPU bottleneck in the timesteping region after annotating the LFRic infrastructure: