Repository navigation
about lfric_apps psy layer and stencils #677
Replies: 8 comments 6 replies
|
Note that the PSyclone complaint is about the number of arguments provided to the kernel in the |
|
There are multiple things that probably need changing to get this right:
|
|
Hi iboutle and Andy Porter (@arporter) I got further through the build after adding the extend arguments imediately after each stencil argument. Rather oddly, it now gives an error message that suggests that mid-build it has reverted back to the default version of psyclone instead of the branch version, as this message should not show up from Andy's psyclone branch 14:56:47 PSyclone - global optimisation /data/users/alan.j.hewitt/branches/Github/lfric_apps/applications/lfric_atm/working/build_lfric_atm/algorithm/jules_timestep_alg_mod.x90 Note that the error is no longer complaining about 'jules_exp_kernel_type' I will check with Benjamin Went (@MetBenjaminWent) if such behaviour is possible and if so how i could prevent it. |
|
Thanks iboutle. The rule is that a kernel should not know/care about halos (while acknowledging that PSyclone still has explicit support for such things that was added in haste and will be removed in future). Obviously, a stencil will result in reads from the halo but the necessary information should be in the stencil dofmaps of those cells on the edge of the domain. Therefore, I would have expected the stencil dofmaps to be dimensioned by the number of owned cells only. Can the kernel be made to work in this way? |
|
OK. This looks like being a bigger Issue then. Bringing Hacka Fett (@christophermaynard) into this conversation as we need to decide what to do about this. |
|
Good news. I have successfully built and run my lfric_apps branch with Andy's pscylone branch at revision 7c9f78f (aka September 1st commit). I took the configuration.nml file from task I also made a new directory I ran into problems with the build step - mistakes i made with the environment setup. however with help from Benjamin Went (@MetBenjaminWent) I was able to get this to build successfully. The run step worked once I had local copies of the above files in place. |
|
Closing this discussion. Future developers could get in touch if they would like to repeat my hacky method of testing a psyclone branch with an lfric_apps branch. Thanks for help everyone. Alan |
Uh oh!
There was an error while loading. Please reload this page.
Andy Porter has developed some new functionality to allow psyclone to work out the psy layer stuff for kernels with stencil support. Previously, these have required additional developments in psykal_lite_physics_mod
stfc/PSyclone#3572
I have been testing this development with an lfric_apps branch, where I have removed all of the relevant psykal_lite code and have modified the kernel and algorithm so that they should work together.
MetOffice/lfric_apps#750
With a lot of help from Ben West, I managed to get my testing branch and Andy Porters psyclone branch working together with the command line build.
I ran into the problem below, where the number of arguments to the jules_exp_kernel_type has increased from 108 to 113.
There are five stencil fields being passed, so it is at least consistent with this.
15:57:53 PSyclone - global optimisation /data/users/alan.j.hewitt/branches/Github/lfric_apps/applications/lfric_atm/working/build_lfric_atm/algorithm/rad_tile_alg_mod.x90
Generation Error: error: expected '113' arguments for the call to kernel 'jules_exp_kernel_type' from invoke 'invoke_2_jules_exp_kernel_type' in the algorithm layer but found '108'. Expected '108' standard arguments, '5' stencil arguments, '0' qr_arguments and '0' halo-depth arguments.
Transformed invoke 'invoke_0' ...
Found 0 ['setval_c'] calls
InvokeSchedule[invoke='invoke_0', dm=True]
0: Loop[type='dof', field_space='any_space_1', it_space='dof', upper_bound='nannexed']
The ten missing arguments from the algorithm layer are:
u_w3_stencil / v_w3_stencil / tile_stencil / sea_u_w3_stencil / sea_v_w3_stencil ( maybe analogous to the map_ arguments )
u_w3_stencil_size / v_w3_stencil_size / tile_stencil_size / sea_u_w3_stencil_size / sea_v_w3_stencil_size
I dont really understand what is happening in psyclone to generate the extra arguments that appear in a kernel layer that are not passed from the algorithm layer, but its not usually a problem as for most algorithm/kernel pairs I understand the pattern. Its probably time for me to take a deeper dive into what is happening in the psy layer.
Sorry for an even wordier question than even I usually write.
Kind regards,
Alan
All reactions