Andy Porter
Andy Porter
I'm beginning to think that this is a compiler bug. If I alter the second invoke so that it calls a specific implementation of the kernel (e.g. mixed_code_64) then it...
This is ready for a first review. It's quite big but can wait until 3.0 is out of the door. Probably needs to be reviewed by @sergisiso.
In experimenting with this branch, I discovered a bug: the routines that a PUBLIC Interface maps to may themselves be declared PRIVATE in their containing module! Unfortunately, in what I've...
Trying this updated branch with LFRic (and my enhanced global.py) I now get: ``` Failed to module-inline routine coordinate_jacobian: Transformation Error: routine 'coordinate_jacobian' contains accesses to 'jacobian_abr2xyz' which is declared...
Attempt to do recursive inlining: ``` Failed to inline call jacobian_abr2xyz(alpha, beta, radius, panel_id): Transformation Error: Routine 'jacobian_abr2XYZ_r_single' cannot be inlined because it accesses variable 'r_single' from its parent container....
Got a crash while processing `init_saturated_profile_alg_mod.x90`: ``` File "/home//Projects/PSyclone/src/psyclone/domain/lfric/lfric_loop.py", line 895, in gen_code super().gen_code(parent) ~~~~~~~~~~~~~~~~^^^^^^^^ File "/home//Projects/PSyclone/src/psyclone/psyir/nodes/loop.py", line 581, in gen_code kernel.rename_and_write() ~~~~~~~~~~~~~~~~~~~~~~~^^ File "/home//Projects/PSyclone/src/psyclone/psyGen.py", line 1664, in rename_and_write self._rename_psyir(new_suffix)...
Fixed that and now get failure when doing: ``` LFRIC_OFFLOAD_DIRECTIVES=omp psyclone -api lfric -d /Projects/LFRic/spack_gfortran/lfric_apps_7536/applications/gungho_model/working/build_gungho_model -s applications/gungho_model/optimisation/psyclone-test/global.py /Projects/LFRic/spack_gfortran/lfric_apps_7536/applications/gungho_model/working/build_gungho_model/algorithm/initialisation/init_saturated_profile_alg_mod.x90 ``` because the kernel schedule obtained in `CodedKern._rename_and_write()` has somehow been detached...
I suspect the problem is that we have module-inlined the kernel and broken something along the way. ``` Module-inlined kernel 'initial_theta_code' Failed to annotate 'initial_theta_code' with GPU-enabled directive due to:...
Further investigation shows that it is when generating the code for `invoke_5` that we get the failure. When processing this invoke I see: ``` Transforming invoke 'invoke_5' ... setting _parent...
This PR simply adds the poly_{1,2}d_reconstruction kernels which both have active variables with stencils. Since we only have manually-created versions of the adjoints of these kernels, these are also provided....