Module fd4_part_sfcd_mod


Uses:
    module fd4_globaldef_mod
    module fd4_domain_mod
    module fd4_iter_mod
    module fd4_part_1d_mod
    module fd4_part_sfc_mod
    module fd4_mpi_mod
    module hilbert_mod
    module hilbert2d_mod
    module morton_mod
    module morton2d_mod
    module mrgrnk_mod
    module stack_mod
    module stack3_mod
    module rbtree_fd4_block_mod
    module timing_mod
Variables:
    integer (kind=i_k), public, parameter :: FD4_PART_SFCD_WGTX_MASTER = 1
    integer (kind=i_k), public, parameter :: FD4_PART_SFCD_WGTX_COLL = 2
    integer (kind=i_k), public, parameter :: FD4_PART_SFCD_SCATTER_ALLGATHER = 101
    integer (kind=i_k), public, parameter :: FD4_PART_SFCD_ALLGATHER_BCAST = 102
    integer, private, parameter :: sfcdbg = 9000
    integer, private :: ferr
Subroutines and functions:
    public subroutine fd4_part_sfcd_weight_simple (domain, local_blocks, sfctype, blkmap_update, use_h2, err)
    public subroutine fd4_part_sfcd_weight (domain, local_blocks, method, p1d_parallel, groupsz, sfctype, binsteps, accuracy, blkmap_update, wgtxmeth, use_h2, dspv_meth, err)
    private subroutine fd4_part_sfcd_exch_weights (domain, cgpart0, cgborders_found, cgborders, exact_part_match, err)
    private subroutine fd4_part_sfcd_exch_weights_coll (domain, cgpart0, cgborders_found, cgborders, exact_part_match, toall, err)

Space-filling curve partitioning of an fd4_domain.

EXPERIMENTAL DISTRIBUTED/HIERARCHICAL VERSION

Supports Hilbert and Morton SFC. One-dimensional partitioning algorithms from fd4_part_1d_mod are used.

Author: Matthias Lieber

See also: module hilbert_mod, module fd4_part_1d_mod, module fd4_domain_mod, module fd4_part_sfc_mod


Description of Subroutines and Functions

fd4_part_sfcd_weight_simple

public subroutine fd4_part_sfcd_weight_simple (domain, local_blocks, sfctype, blkmap_update, use_h2, err)
    type (fd4_domain), intent(inout) :: domain
    type (stack3), intent(inout) :: local_blocks
    integer (kind=i_k), intent(in) :: sfctype
    logical, intent(in) :: blkmap_update
    logical, intent(in) :: use_h2
    integer (kind=i_k), intent(out) :: err
end subroutine fd4_part_sfcd_weight_simple
Parameters:
domain the domain
local_blocks stack3 of new local partition (differs from rank to rank)
sfctype space-filling curve to use
blkmap_update update the full block map
use_h2 use H2 heuristic instead of H1 (Miguet & Pierson)
err error status: 0...ok
Create a new partition using block position. Considers block weights from domain%balance%blkweights.

This version only works in non-adaptive block mode and when the SFC type is never changed.

Uses simple 1D partitioning heuristic.

TODO:


fd4_part_sfcd_weight

public subroutine fd4_part_sfcd_weight (domain, local_blocks, method, p1d_parallel, groupsz, sfctype, binsteps, accuracy, blkmap_update, wgtxmeth, use_h2, dspv_meth, err)
    type (fd4_domain), intent(inout) :: domain
    type (stack3), intent(inout) :: local_blocks
    integer (kind=i_k), intent(in) :: method
    logical, intent(in) :: p1d_parallel
    integer (kind=i_k), intent(in) :: groupsz
    integer (kind=i_k), intent(in) :: sfctype
    integer (kind=i_k), intent(in) :: binsteps
    real (kind=r8k), intent(in) :: accuracy
    logical, intent(in) :: blkmap_update
    integer (kind=i_k), intent(in) :: wgtxmeth
    logical, intent(in) :: use_h2
    integer, intent(in) :: dspv_meth
    integer (kind=i_k), intent(out) :: err
end subroutine fd4_part_sfcd_weight
Parameters:
domain the domain
local_blocks stack3 of new local partition (differs from rank to rank)
method 1D partitioning method to use
p1d_parallel perform high-quality 1D partitioning in parallel?
groupsz size of groups
sfctype space-filling curve to use
binsteps max. number of steps for binary search methods
accuracy target ratio from best possible load balance for binary steps estimation, must be <= 1.0
blkmap_update update the full block map
wgtxmeth method for exchanging block weights
use_h2 use H2 heuristic instead of H1 (Miguet & Pierson)
dspv_meth method of partition vector distribution when p1d_parallel is false
err error status: 0...ok
Create a new partition using block position. Considers block weights from domain%balance%blkweights.

This version only works in non-adaptive block mode and when the SFC type is never changed.


fd4_part_sfcd_exch_weights

private subroutine fd4_part_sfcd_exch_weights (domain, cgpart0, cgborders_found, cgborders, exact_part_match, err)
    type (fd4_domain), intent(inout) :: domain
    integer (kind=i_k), intent(in) :: cgpart0
    type (stack), intent(in) :: cgborders_found
    integer (kind=i_k), intent(in), dimension (4) :: cgborders
    logical, intent(in) :: exact_part_match
    integer (kind=i_k), intent(out) :: err
end subroutine fd4_part_sfcd_exch_weights
Parameters:
domain the domain
cgpart0 lower bound for search of local coarse border matches
cgborders_found stack containing local matches of coarse partition borders
cgborders partitions borders/ranks of own coarse partition
exact_part_match first local block exactly starts new coarse partition?
err error status: 0...ok
Exchange block weights. This is FD4_PART_SFCD_WGTX_MASTER.

Method:


fd4_part_sfcd_exch_weights_coll

private subroutine fd4_part_sfcd_exch_weights_coll (domain, cgpart0, cgborders_found, cgborders, exact_part_match, toall, err)
    type (fd4_domain), intent(inout) :: domain
    integer (kind=i_k), intent(in) :: cgpart0
    type (stack), intent(in) :: cgborders_found
    integer (kind=i_k), intent(in), dimension (4) :: cgborders
    logical, intent(in) :: exact_part_match
    logical, intent(in) :: toall
    integer (kind=i_k), intent(out) :: err
end subroutine fd4_part_sfcd_exch_weights_coll
Parameters:
domain the domain
cgpart0 lower bound for search of local coarse border matches
cgborders_found stack containing local matches of coarse partition borders
cgborders partitions borders/ranks of own coarse partition
exact_part_match first local block exactly starts new coarse partition?
toall gather weights to all (or only masters)?
err error status: 0...ok
Exchange block weights. Less p2p traffic than fd4_part_sfcd_exch_weights. This is FD4_PART_SFCD_WGTX_COLL.

Method: