| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 at least 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 |
|
| real(kind=real_t), | intent(in), | optional | :: | ubvec(ncon) | An array of size |
|
| integer(kind=idx_t), | intent(in), | optional | :: | options(METIS_NOPTIONS) | An array of options as described in Section 5.4 of the 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 |
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.
This function is used to partition a graph into nparts parts using multilevel \(k\)-way partitioning.
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_OBJTYPE, METIS_OPTION_CTYPE, METIS_OPTION_IPTYPE,
METIS_OPTION_RTYPE, METIS_OPTION_NO2HOP, METIS_OPTION_NCUTS,
METIS_OPTION_NITER, METIS_OPTION_UFACTOR, METIS_OPTION_MINCONN,
METIS_OPTION_CONTIG, METIS_OPTION_SEED, METIS_OPTION_NUMBERING,
METIS_OPTION_DBGLVL