Open mfdeakin-sandia opened 6 years ago
Also clean up boundary_exchange_ut, since it's also a lot of repeated code
Agreed on 2 and 3. For number 1, the reason I made them exclusive is that you never do 1D and 2D/3D at the same time. So if you have, say, some 3D fields registered and one 1D field registered, when you call the minmax exchange, you end up communicating way more than what you need. To avoid this, you should store two sets of send/recv requests, and start/wait only the ones that you actually need to do. You would then have to make sure all the 1D entries are contiguous in the buffer, and all the 2D/3D entries are contiguous in the buffer. It is possible, but it may require some time to come up with a decent design. Splitting the class in two would make it "simpler", at the cost of a probably large code duplication.
I don't have a strong preference in this.
Here's a list of potentially not well thought out ideas on what to do to make it a more intuitive interface and easier to understand:
pack_and_send
,recv_and_unpack
, andbuild_buffers_views_and_requests
(especially this one since it looks like a fair amount of code repetition) look viable for cleaning up.Thoughts?