METIS_PartGraphRecursive Interface

interface
public function METIS_PartGraphRecursive(nvtxs, ncon, xadj, adjncy, vwgt, vsize, adjwgt, nparts, tpwgts, ubvec, options, objval, part) result(ierr) bind(C,name="METIS_PartGraphRecursive")

Arguments

Type IntentOptional AttributesName
integer(kind=idx_t), intent(in) :: nvtxs

The number of vertices in the graph.

integer(kind=idx_t), intent(in) :: ncon

The number of balancing constraints. It should be atleast 1.

integer(kind=idx_t), intent(in), dimension(*):: xadj

The adjacency structure of the graph as described in section 5.5 of the manual.

integer(kind=idx_t), intent(in), dimension(*):: adjncy

The adjacency structure of the graph as described in section 5.5 of the manual.

integer(kind=idx_t), intent(in), optional dimension(*):: vwgt

The weights of the vertices as described in Section 5.5 of the manual.

integer(kind=idx_t), intent(in), optional dimension(*):: vsize

The size of the vertices for computing the total communication volume as described in section 5.7 of the manual.

integer(kind=idx_t), intent(in), optional dimension(*):: adjwgt

The weights of the edges as describe in Section 5.5 of the manual.

integer(kind=idx_t), intent(in) :: nparts

The number of parts to partition the graph.

real(kind=real_t), intent(in), optional :: tpwgts(nparts*ncon)

An array of size nparts*ncon that specifies the desired weight for each partition and constraint. If not present, the graph is divided equally among the partitions. More in the description.

real(kind=real_t), intent(in), optional :: ubvec(ncon)

An array of size ncon that specifies the allowed load imbalance for each constraint. For the i-th partition and j-th constraint the allowed weight is the ubvec(j)*tpwgts(i*ncon+j) fraction of the j-th's constraint total weight. If not present, the load imbalance tolerance is 1.001 (for ncon = 1) or 1.01 (for ncon > 1).

integer(kind=idx_t), intent(in), optional :: options(METIS_NOPTIONS)

An array of options as described in Section 5.4 of the METIS manual. See description for valid options.

integer(kind=idx_t), intent(out) :: objval

Upon successful completion, this variable stores the edge-cut or the total communication volume of the partitioning solution. The value returned depends on the partitioning's objective function.

integer(kind=idx_t), intent(out) :: part(nvtxs)

This is a vector of size nvtxs that upon successful completion stores the partition vector of the graph. The numbering of this vector starts from either 0 or 1, depending on the value of options(METIS_OPTION_NUMBERING).

Return Value integer(kind=idx_t)

METIS_OK - Indicates that the function returned normally.
METIS_ERROR_INPUT - Indicates an input error.
METIS_ERROR_MEMORY - Indicates that it could not allocate the required memory.
METIS_ERROR - Indicates some other type of error.

Description

This function is used to partition a graph into nparts parts using recursive bisection.

If tpwgt is present, the target partition weight for the i-th partition and j-th constraint should be specified at tpwgts(i*ncon+j) (the numbering for both partitions and constraints starts from 0). For each constraint, the sum of the tpwgtsentries must be 1.0.

The following options are valid:
METIS_OPTION_CTYPE, METIS_OPTION_IPTYPE, METIS_OPTION_RTYPE, METIS_OPTION_NO2HOP, METIS_OPTION_NCUTS, METIS_OPTION_NITER, METIS_OPTION_SEED, METIS_OPTION_UFACTOR, METIS_OPTION_NUMBERING, METIS_OPTION_DBGLVL