gmarkall / manycore_form_compiler

MCFC is deprecated. See https://code.launchpad.net/~grm08/ffc/pyop2
https://code.launchpad.net/~grm08/ffc/pyop2
GNU General Public License v3.0
3 stars 1 forks source link

Compute stat file diagnostics on device for fields currently on the device #39

Open kynan opened 13 years ago

kynan commented 13 years ago

See discussion in #32

gmarkall commented 13 years ago

(This is a slightly premature response but I understand it's going to be discussed at the meeting in about 15 minutes).

I suspect we need a new function, compute_stat_() in the generated code that generates the stats on the device for each field - I imagine the cuda kernels that it uses will not need to be generated, but will just need to be invoked with a pointer to the field data. I expect compute_stat_() can iterate over the fields map.

The fluidity call calculate_diagnostic_variables tries to compute them for all fields, so for the fields that are only up to date on the device, the values are going to be wrong - we need some way to either stop calculate_diagnostic_variables from computing these values, and instead use them from elsewhere, but I don't know how to do this - maybe we can look at its source to see if there is some easy way to do this?

dham commented 13 years ago

My plan on this is that fluidity fields are going to hold a pointer to their corresponding OP_DAT. Fluidity can also know if the fluidity version of the field is current. Using these it should be easy during calculate_diagnostic_variables to choose the current code or to launch an OP2 version.

I also think we don't need to fix this yet.