microhh / rte-rrtmgp-cpp

C++ / CUDA implementation of RTE+RRTMGP radiative transfer solver
BSD 3-Clause "New" or "Revised" License
3 stars 19 forks source link

Merge kernels into rte-rrtmgp #21

Open goord opened 3 years ago

goord commented 3 years ago

In this issue we can discuss a strategy to insert our tuned kernels into the rte-rrtmgp original source code.

goord commented 3 years ago

Regarding the kernels, the quickest way would be to wrap all kernel launches in C-functions, with void** argument type for any array, which can be called from Fortran.

The memory is more tricky:

For sustainability, it will be useful to setup a 'mirroring' administration connecting CPU-arrays with their GPU equivalent

goord commented 3 years ago

The memory solution above does not take into account automatic allocations inside subroutines in the Fortran code. If we want to replace those with our pool allocations, more changes need to be made to the Fortran code.