PSyclone
PSyclone copied to clipboard
[psyclone-kern, PSyAD] Add command-line flags to identify special kernel arguments
Currently the psyclone-kern algorithm-generation functionality initialises every field argument that it finds to unity. However, LFRic kernels often have arguments that contain geometric information and this should be correctly set-up. (This is especially important for the adjoint test-harness generation functionality.) This will require command line arguments to specify which kernel arguments are 'special'. The two types of kernel argument identified so far are:
- The Chi field (containing coordinates);
- The 'face_id' field (maps from a cell to a face ID).
Since the algorithm-generation functionality works with the kernel meta-data, the only way that a user can specify which arguments are 'special' is identify their position in the list of meta_args
.
I've made a start on this on branch 1708_specify_panel_id
although I've realised that there's not much I can do until at least #1620 is merged.
This issue has been resolved by the addition of API-specific information - the user no longer needs to identify special arguments.
Unfortunately, I think I was wrong to close this. We still need to know which arguments to a kernel are 'special' otherwise we treat them all the same. In the PSyAD test harness this means that they get over-written with random data which is not what we want.
This now produces a working* test harness for the vorticity kernel.
- well, almost. There are some un-used variables declared in the adjoint kernel and the LFRic build system is configured to raise an error for those. If I manually remove them then all is fine.
I've realised that what I have so far is only for psyad. I need to do psyclone-kern
too.