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
104 stars 28 forks source link

update psyad kernels to latest version of trunk + new kernels #2337

Open rupertford opened 1 year ago

rupertford commented 1 year ago

The PSyAD tangent-linear kernels that were identified as needing adjoints are captured and built in psyclone/examples/psyad/lfric. However, some of these have been updated and or renamed since this was done so need updating. Further, Tim Payne has indentified some more that are required, so the list needs updating. I should also add a document giving a list and the status of each of these kernels as @DrTVockerodtMO has asked for this in the past.

The new files identified by Tim are:

(a) gungho/working/gungho/kernel/iterative_solvers/apply_helmholtz_operator_kernel_mod.F90 (b) gungho/working/gungho/kernel/iterative_solvers/apply_variable_hx_kernel_mod.F90

These are in addition to (c) gungho/source/kernel/transport/mol/poly1d_reconstruction_kernel_mod.F90 and (d) gungho/source/kernel/transport/mol/poly2d_reconstruction_kernel_mod.F90

which I should already be looking at as they need stencils - as does a).

rupertford commented 11 months ago

Created branch 2337_add_and_update_kernels

DrTVockerodtMO commented 11 months ago

@rupertford I think now that the status document is not necessary, as my current branch in LFRic works with all kernels minus ones involving stencils for now. This should be a healthy amount for the initial commit. If the psyad examples in this repo are updated that can serve as the status document.

Getting these new kernels on board is more of a priority than the document I requested. I have got the non stencil based ones to compile properly on my branch!

rupertford commented 11 months ago

OK. I presume you don't yet have apply_variable_hx_kernel_mod.F90 so I'll pass that on first.