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
Subroutines and functions:
    public subroutine fd4_part_sfcd_weight (domain, local_blocks, method, groupsz, sfctype, balance, err, opt_binsteps, opt_accuracy, opt_blkmap_update, opt_wgtxmeth)
    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, 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

public subroutine fd4_part_sfcd_weight (domain, local_blocks, method, groupsz, sfctype, balance, err, opt_binsteps, opt_accuracy, opt_blkmap_update, opt_wgtxmeth)
    type (fd4_domain), intent(inout) :: domain
    type (stack3), intent(inout) :: local_blocks
    integer (kind=i_k), intent(in) :: method
    integer (kind=i_k), intent(in) :: groupsz
    integer (kind=i_k), intent(in) :: sfctype
    real (kind=r4k), intent(out) :: balance
    integer (kind=i_k), intent(out) :: err
    integer (kind=i_k), optional, intent(in) :: opt_binsteps
    real (kind=r8k), optional, intent(in) :: opt_accuracy
    logical, optional, intent(in) :: opt_blkmap_update
    integer (kind=i_k), optional, intent(in) :: opt_wgtxmeth
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
groupsz size of groups
sfctype space-filling curve to use
balance estimated balance of new partitioning (not implemented)
err error status: 0...ok
opt_binsteps max. number of steps for binary search methods, default: 100
opt_accuracy target ratio from best possible load balance for binary steps estimation, must be <= 1.0, default: 0.99
opt_blkmap_update update the full block map, default: true
opt_wgtxmeth method for exchanging block weights
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.

opt_wgtxmeth may be FD4_PART_SFCD_WGTX_MASTER or FD4_PART_SFCD_WGTX_COLL. Default is FD4_PART_SFCD_WGTX_COLL.

EXPERIMENTAL DISTRIBUTED/HIERARCHICAL VERSION:


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, 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_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?
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: