E3SM-Project / HOMMEXX

Clone of ACME for CMDV-SE project to convert HOMME to C++
11 stars 0 forks source link

Cleanup BoundaryExchange #246

Open mfdeakin-sandia opened 6 years ago

mfdeakin-sandia commented 6 years ago

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:

Thoughts?

mfdeakin-sandia commented 6 years ago

Also clean up boundary_exchange_ut, since it's also a lot of repeated code

bartgol commented 6 years ago

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.