What are members in CommMetaData #1821
-
| 
         I try to understand how to customize communication of  struct CommMetaData
{
    // The cache of local and send/recv per FillBoundary() or ParallelCopy().
    bool m_threadsafe_loc = false;
    bool m_threadsafe_rcv = false;
    std::unique_ptr<CopyComTagsContainer>      m_LocTags;
    std::unique_ptr<MapOfCopyComTagContainers> m_SndTags;
    std::unique_ptr<MapOfCopyComTagContainers> m_RcvTags;
};where struct CopyComTag
{
	Box dbox;
        Box sbox;
        int dstIndex;
        int srcIndex;
        /* omit constructors and typedefs */
};
using CopyComTagsContainer = std::vector<CopyComTag>;
using MapOfCopyComTagContainers = std::map<int, std::vector<CopyComTag>>;Question: Could you explain the member variables of those classes to me? Are LocTags (local tags?) of same shape as local FABs? What about the maps? Does dstIndex and srcIndex mean components? Can I use   | 
  
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| 
         
 
 Yes, I believe you can use   | 
  
Beta Was this translation helpful? Give feedback.
CopyComTagstores the meta-data for copying the data from a subregionsbox(heresmeans source) of the sourceFabArrayto a subregiondboxof the destinationFabArray. The integerssrcIndexanddstIndexspecify the global box index in theFabArrays. That issource_fabarray[srcIndex]gives us the source Fab (e.g.,FArrayBox).CommMetaData::m_LocTagsare for copying data locally (as opposed to via MPI). The information for sending and receiving using MPI is stored inm_SndTagsandm_RcvTagsasstd::map. The key to the map is the MPI rank (destination rank form_SndTagsand source rank form_RcvTags). The two boolean flags are used to indicate if there are race conditions (i.e., multiple th…