|
template<class IdViewType, class RankViewType> |
| Halo (MPI_Comm comm, const std::size_t num_local, const IdViewType &element_export_ids, const RankViewType &element_export_ranks, const std::vector< int > &neighbor_ranks) |
| Neighbor and export rank constructor. Use this when you already know which ranks neighbor each other (i.e. every rank already knows who they will be exporting to and receiving from) as it will be more efficient. In this case you already know the topology of the point-to-point communication but not how much data to send and receive from the neighbors.
|
|
template<class IdViewType, class RankViewType> |
| Halo (MPI_Comm comm, const std::size_t num_local, const IdViewType &element_export_ids, const RankViewType &element_export_ranks) |
| Export rank constructor. Use this when you don't know who you will receiving from - only who you are sending to. This is less efficient than if we already knew who our neighbors were because we have to determine the topology of the point-to-point communication first.
|
|
std::size_t | numLocal () const |
| Get the number of elements locally owned by this rank.
|
|
std::size_t | numGhost () const |
| Get the number of ghost elements this rank. Use this to resize a data structure for scatter/gather operations. For use with scatter gather, a data structure should be of size numLocal() + numGhost().
|
|
| CommunicationPlan (MPI_Comm comm) |
| Constructor.
|
|
MPI_Comm | comm () const |
| Get the MPI communicator.
|
|
int | numNeighbor () const |
| Get the number of neighbor ranks that this rank will communicate with.
|
|
int | neighborRank (const int neighbor) const |
| Given a local neighbor id get its rank in the MPI communicator.
|
|
std::size_t | numExport (const int neighbor) const |
| Get the number of elements this rank will export to a given neighbor.
|
|
std::size_t | totalNumExport () const |
| Get the total number of exports this rank will do.
|
|
std::size_t | numImport (const int neighbor) const |
| Get the number of elements this rank will import from a given neighbor.
|
|
std::size_t | totalNumImport () const |
| Get the total number of imports this rank will do.
|
|
std::size_t | exportSize () const |
| Get the number of export elements.
|
|
Kokkos::View< std::size_t *, memory_space > | getExportSteering () const |
| Get the steering vector for the exports.
|
|
template<class ExecutionSpace, class ViewType> |
Kokkos::View< size_type *, memory_space > | createFromExportsAndTopology (ExecutionSpace exec_space, const ViewType &element_export_ranks, const std::vector< int > &neighbor_ranks) |
| Neighbor and export rank creator. Use this when you already know which ranks neighbor each other (i.e. every rank already knows who they will be sending and receiving from) as it will be more efficient. In this case you already know the topology of the point-to-point communication but not how much data to send to and receive from the neighbors.
|
|
template<class ViewType> |
Kokkos::View< size_type *, memory_space > | createFromExportsAndTopology (const ViewType &element_export_ranks, const std::vector< int > &neighbor_ranks) |
| Neighbor and export rank creator. Use this when you already know which ranks neighbor each other (i.e. every rank already knows who they will be sending and receiving from) as it will be more efficient. In this case you already know the topology of the point-to-point communication but not how much data to send to and receive from the neighbors.
|
|
template<class ExecutionSpace, class ViewType> |
Kokkos::View< size_type *, memory_space > | createFromExportsOnly (ExecutionSpace exec_space, const ViewType &element_export_ranks) |
| Export rank creator. Use this when you don't know who you will receiving from - only who you are sending to. This is less efficient than if we already knew who our neighbors were because we have to determine the topology of the point-to-point communication first.
|
|
template<class ViewType> |
Kokkos::View< size_type *, memory_space > | createFromExportsOnly (const ViewType &element_export_ranks) |
| Export rank creator. Use this when you don't know who you will receiving from - only who you are sending to. This is less efficient than if we already knew who our neighbors were because we have to determine the topology of the point-to-point communication first.
|
|
template<class PackViewType, class RankViewType> |
void | createExportSteering (const PackViewType &neighbor_ids, const RankViewType &element_export_ranks) |
| Create the export steering vector.
|
|
template<class PackViewType, class RankViewType, class IdViewType> |
void | createExportSteering (const PackViewType &neighbor_ids, const RankViewType &element_export_ranks, const IdViewType &element_export_ids) |
| Create the export steering vector.
|
|
template<class MemorySpace>
class Cabana::Halo< MemorySpace >
A communication plan for scattering and gathering of ghosted data.
- Template Parameters
-
MemorySpace | Kokkos memory space in which data for this class will be allocated. |
The halo allows for scatter and gather operations between locally-owned and ghosted data. All data in the Halo (e.g. export and import data) is from the point of view of the forward GATHER operation such that, for example, the number of exports is the number of exports in the gather and the number of imports is the number of imports in the gather. The reverse SCATTER operation sends the ghosted data back the the uniquely-owned decomposition and resolves collisions. Based on input for the forward communication plan (where local data will be sent) the local number of ghosts is computed. Some nomenclature:
Export - the local data we uniquely own that we will send to other ranks for those ranks to be used as ghosts. Export is used in the context of the forward communication plan (the gather).
Import - the ghost data that we get from other ranks. The rank we get a ghost from is the unique owner of that data. Import is used in the context of the forward communication plan (the gather).