Module fd4_part_metis_mod


Uses:
    module fd4_globaldef_mod
    module fd4_domain_mod
    module fd4_mpi_mod
    module fd4_block_mod
    module fd4_stat_mod
    module rbtree_fd4_block_mod
    module stack_mod
    module stack3_mod
    module timing_mod
Variables:
    integer (kind=i_k), public :: fd4_part_metis_dump = 0
Subroutines and functions:
    public subroutine fd4_part_metis (domain, all_blocks, all_blocks_len, local_blocks, ubvec, itr, wfactor, use_adjwgt, use_vsize)
    public subroutine fd4_part_metis_subset (domain, all_blocks, all_blocks_len, local_blocks, ubvec, itr, subset)

ParMETIS partitioning of an fd4_domain.

TODO:

IDEAS:

Author: Matthias Lieber

See also: module fd4_domain_mod


Description of Subroutines and Functions

fd4_part_metis

public subroutine fd4_part_metis (domain, all_blocks, all_blocks_len, local_blocks, ubvec, itr, wfactor, use_adjwgt, use_vsize)
    type (fd4_domain), intent(inout) :: domain
    integer (kind=i_k), pointer, dimension (:,:) :: all_blocks
    integer (kind=i_k), intent(in) :: all_blocks_len
    type (stack3), intent(inout) :: local_blocks
    real (kind=r4k), intent(in), dimension (1) :: ubvec
    real (kind=r4k), intent(in) :: itr
    real (kind=r4k), intent(in) :: wfactor
    logical, intent(in) :: use_adjwgt
    logical, intent(in) :: use_vsize
end subroutine fd4_part_metis
Parameters:
domain the domain
all_blocks array of positions of the blocks in the new partion
all_blocks_len length of all_blocks(3,:)
local_blocks stack3 of new local partition (differs from rank to rank)
ubvec ParMetis ubvec parameter
itr ParMetis itr parameter
wfactor multiply this with block's weight before converting to int
use_adjwgt use weights for edges?
use_vsize use (memory size) weights for vertices?
Create a new partition using ParMETIS.

If wfactor is 0, ParMETIS is called without block weights.


fd4_part_metis_subset

public subroutine fd4_part_metis_subset (domain, all_blocks, all_blocks_len, local_blocks, ubvec, itr, subset)
    type (fd4_domain), intent(inout) :: domain
    integer (kind=i_k), pointer, dimension (:,:) :: all_blocks
    integer (kind=i_k), intent(in) :: all_blocks_len
    type (stack3), intent(inout) :: local_blocks
    real (kind=r4k), intent(in), dimension (1) :: ubvec
    real (kind=r4k), intent(in) :: itr
    integer (kind=i_k), intent(in) :: subset
end subroutine fd4_part_metis_subset
Parameters:
domain the domain
all_blocks array of positions of the blocks in the new partion
all_blocks_len length of all_blocks(3,:)
local_blocks stack3 of new local partition (differs from rank to rank)
ubvec ParMetis ubvec parameter
itr ParMetis itr parameter
subset use only subset processes for calculation (<2...off)
Create a new partition using ParMETIS. Only a subset of ranks calls ParMETIS.

WORK IN PROGRESS

TODO: