| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | pointer, dimension(:) | :: | elemToRank | |||
| type(c_ptr), | public | :: | elemToRank_gpu | ||||
| logical, | public | :: | halo_built | = | .false. | ||
| integer, | public | :: | halo_nnbr | = | 0 | ||
| integer, | public | :: | halo_nsides | = | 0 | ||
| integer, | public, | allocatable | :: | halo_offset(:) | |||
| integer, | public, | allocatable | :: | halo_rank(:) | |||
| type(c_ptr), | public | :: | halo_sides_gpu | = | c_null_ptr | ||
| logical, | public | :: | initialized | = | .false. | ||
| integer, | public | :: | maxMsg | ||||
| integer, | public | :: | mpiComm | = | MPI_COMM_NULL | ||
| logical, | public | :: | mpiEnabled | = | .false. | ||
| integer, | public | :: | mpiPrec | ||||
| integer, | public | :: | msgCount | ||||
| integer, | public | :: | nElem | ||||
| integer, | public | :: | nRanks | ||||
| integer, | public, | pointer, dimension(:) | :: | offSetElem | |||
| logical, | public | :: | ownsMpi | = | .false. | ||
| integer, | public | :: | rankId | ||||
| integer, | public, | allocatable | :: | requests(:) | |||
| integer, | public, | allocatable | :: | stats(:,:) |
Build the aggregated halo exchange tables for the mesh this domain decomposition belongs to.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | sideInfo(1:5,1:nSidesPerElem,1:nElem) | |||
| integer, | intent(in) | :: | nElem | |||
| integer, | intent(in) | :: | nSidesPerElem |
Counts the mortar sub-sides this rank exchanges over MPI: those where exactly one of the big side and the sub-side is owned by this rank. A mortar entirely on one rank is served from memory, and one entirely on other ranks is not this rank's to carry.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition_t), | intent(in) | :: | this | |||
| integer, | intent(in), | pointer | :: | mortarInfo(:,:) | ||
| integer, | intent(in) | :: | nMortars | |||
| integer, | intent(in) | :: | nSub |
Counts the conforming sides of the local elements whose neighbor element is owned by another rank -- the sides an exchange sends and receives over MPI.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition_t), | intent(in) | :: | this | |||
| integer, | intent(in) | :: | sideInfo(1:5,1:nSidesPerElem,1:nElem) | |||
| integer, | intent(in) | :: | nElem | |||
| integer, | intent(in) | :: | nSidesPerElem |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition_t), | intent(inout) | :: | mpiHandler |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | nGlobalElem | |||
| integer, | intent(in) | :: | maxMsg |
Device-aware wrapper of GenerateDecompositionFromOffsets_DomainDecomposition_t: builds the host decomposition from the prescribed offsets, then mirrors elemToRank to the device, as SetElemToRank does for the balanced decomposition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | offsetElem(1:this%nRanks+1) | |||
| integer, | intent(in) | :: | maxMsg |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition), | intent(inout) | :: | this | |||
| integer, | intent(in), | optional | :: | comm |
Ensures the non-blocking request and status scratch can hold nMsg messages
in flight, growing it when it cannot.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | nMsg |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DomainDecomposition), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | nElem |
type,extends(DomainDecomposition_t) :: DomainDecomposition
type(c_ptr) :: elemToRank_gpu
! Aggregated MPI halo exchange tables, shared by every field on the mesh.
! All locally-owned sides with a neighbor element on another rank are
! enumerated once, grouped by neighbor rank and sorted by global side id
! within each group, so that the two ranks sharing an interface enumerate
! its sides in the same order and packed message buffers line up without
! any per-message metadata. Field classes allocate their own packed
! send/receive buffers (sized by their variable count) and share these
! tables for the pack/unpack kernels and message posting.
logical :: halo_built = .false.
integer :: halo_nnbr = 0 ! Number of neighboring ranks
integer :: halo_nsides = 0 ! Total number of sides exchanged with other ranks
integer,allocatable :: halo_rank(:) ! (1:halo_nnbr) neighbor rank ids
integer,allocatable :: halo_offset(:) ! (1:halo_nnbr+1) side-list offsets per neighbor
type(c_ptr) :: halo_sides_gpu = c_null_ptr ! (element,side,flip) triplets, device copy
contains
procedure :: Init => Init_DomainDecomposition
procedure :: Free => Free_DomainDecomposition
procedure :: SetElemToRank => SetElemToRank_DomainDecomposition
procedure :: GenerateDecompositionFromOffsets => GenerateDecompositionFromOffsets_DomainDecomposition
procedure :: BuildHaloExchange => BuildHaloExchange_DomainDecomposition
endtype DomainDecomposition