ascent icon indicating copy to clipboard operation
ascent copied to clipboard

pre-execute: traverse actions and determine set of fields involved

Open cyrush opened this issue 5 years ago • 6 comments

helps sim codes only wrap fields the actions will digest -- especially useful if the wrapping can involve some cpu/gpu transfers.

one solution exists, share with brian ryujin

cyrush avatar Dec 09 '20 22:12 cyrush

or copies

mclarsen avatar Dec 09 '20 22:12 mclarsen

so we have this, but we need to read the actions. one solution I implemented is to have one rank read the actions and broadcast the actions to all other ranks. Then they all call the filter fields methods. Alternatively, we could have rank 0 read and create a list of fields, then broadcast the strings to the other ranks.

mclarsen avatar Dec 09 '20 22:12 mclarsen

could we have a dry-run execute mode, that way we can simply rely on execute and info to get the details in and out?

cyrush avatar Dec 09 '20 23:12 cyrush

This would require us to

  1. have all filters tell us about what they used (touching everything)
  2. support a dry run

We would still have the issue of filters using all fields (like relay). Currently, if you use field filtering in the relay case without explicitly specifying a field list, then it complains that it isn't supported and that you need to use the field list.

mclarsen avatar Dec 10 '20 15:12 mclarsen

we could implement the action scan smarts as a dry run to start, then figure out if we would want to extend.

I think perfect dry run is pretty difficult, especially with expressions and triggers, etc.

cyrush avatar Dec 10 '20 16:12 cyrush

This is what we have now:

https://github.com/Alpine-DAV/ascent/blob/e0afe9750ba047f5916805dec5aec95f4e16c1e1/src/ascent/utils/ascent_actions_utils.hpp#L64

mclarsen avatar Jan 04 '21 16:01 mclarsen