A Fortran interface to the METIS graph partitioning library.
http://glaros.dtc.umn.edu/gkhome/node/877
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | idx_t | = | c_int32_t | |
integer, | public, | parameter | :: | real_t | = | c_float | |
integer(kind=idx_t), | public, | parameter | :: | METIS_NOPTIONS | = | 40 | Number of METIS OPTIONS |
integer(kind=idx_t), | public, | parameter | :: | METIS_OK | = | 1 | Returned normally. |
integer(kind=idx_t), | public, | parameter | :: | METIS_ERROR_INPUT | = | -2 | Returned due to erroneous inputs and/or options. |
integer(kind=idx_t), | public, | parameter | :: | METIS_ERROR_MEMORY | = | -3 | Returned due to insufficient memory. |
integer(kind=idx_t), | public, | parameter | :: | METIS_ERROR | = | -4 | Return status: some other type of error. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_PTYPE | = | 0 | Specifies the partitioning method. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_OBJTYPE | = | 1 | Specifies the type of objective. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_CTYPE | = | 2 | Specifies the matching scheme to be used during coarsening. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_IPTYPE | = | 3 | Determines the algorithm used during initial partitioning. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_RTYPE | = | 4 | Determines the algorithm used for refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_DBGLVL | = | 5 | Specifies the amount of progress/debugging information will be printed. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_NITER | = | 6 | Specifies the number of iterations for the refinement algorithm. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_NCUTS | = | 7 | Specifies the number of different partitionings that it will compute. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_SEED | = | 8 | Specifies the seed for the random number generator. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_NO2HOP | = | 9 | Specifies that the coarsening will not perform any 2–hop matchings when the standard matching approach fails to sufficiently coarsen the graph. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_MINCONN | = | 10 | Specifies that the partitioning routines should try to minimize the maximum degree of the subdomain graph. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_CONTIG | = | 11 | Specifies that the partitioning routines should try to produce partitions that are contigous. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_COMPRESS | = | 12 | Specifies that the graph should be compressed by combining together vertices that have identical adjacency lists. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_CCORDER | = | 13 | Specifies if the connected components of the graph should first be identifies and ordered separately. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_PFACTOR | = | 14 | Specifies the minimum degree of the vertices that will be ordered last. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_NSEPS | = | 15 | Specifies the number of different separators that it will compute at each level of nested dissection. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_UFACTOR | = | 16 | Specifies the maximum allowed load imbalance among the partitions. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OPTION_NUMBERING | = | 17 | Used to indicate which numbering scheme is used for the adjacency structure of a graph or the element-node structure of a mesh |
integer(kind=idx_t), | public, | parameter | :: | METIS_PTYPE_RB | = | 0 | Multilevel recursive bisectioning. |
integer(kind=idx_t), | public, | parameter | :: | METIS_PTYPE_KWAY | = | 1 | Multilevel \(k\)-way partitioning. |
integer(kind=idx_t), | public, | parameter | :: | METIS_CTYPE_RM | = | 0 | Random matching. |
integer(kind=idx_t), | public, | parameter | :: | METIS_CTYPE_SHEM | = | 1 | Sorted heavy-edge matching. |
integer(kind=idx_t), | public, | parameter | :: | METIS_IPTYPE_GROW | = | 0 | Grows a bisection using a greedy strategy. |
integer(kind=idx_t), | public, | parameter | :: | METIS_IPTYPE_RANDOM | = | 1 | Computes a bisection at random followed by a refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_IPTYPE_EDGE | = | 2 | Derives a separator form an edge cut. |
integer(kind=idx_t), | public, | parameter | :: | METIS_IPTYPE_NODE | = | 3 | Grows a bisection using a greedy node-based strategy. |
integer(kind=idx_t), | public, | parameter | :: | METIS_IPTYPE_METISRB | = | 4 | |
integer(kind=idx_t), | public, | parameter | :: | METIS_RTYPE_FM | = | 0 | FM-based cut refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_RTYPE_GREEDY | = | 1 | Greedy-based cut and volume refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_RTYPE_SEP2SIDED | = | 2 | Two-sided node FM refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_RTYPE_SEP1SIDED | = | 3 | One-sided node FM refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_INFO | = | 1 | Shows various diagnostic messages. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_TIME | = | 2 | Perform timing analysis. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_COARSEN | = | 4 | Show the coarsening progress. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_REFINE | = | 8 | Show the refinement progress. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_IPART | = | 16 | Show info on initial partitioning. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_MOVEINFO | = | 32 | Show info on vertex moves during refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_SEPINFO | = | 64 | Show info on vertex moves during sep refinement. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_CONNINFO | = | 128 | Show info on minimization of subdomain connectivity. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_CONTIGINFO | = | 256 | Show info on elimination of connected components. |
integer(kind=idx_t), | public, | parameter | :: | METIS_DBG_MEMORY | = | 2048 | Show info related to wspace allocation. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OBJTYPE_CUT | = | 0 | Edge-cut minimization. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OBJTYPE_VOL | = | 1 | Total communication volume minimization. |
integer(kind=idx_t), | public, | parameter | :: | METIS_OBJTYPE_NODE | = | 2 |
This function is used to partition a graph into nparts
parts using recursive bisection.
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 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 |
|
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 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 |
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.
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 mesh into nparts
parts based on a partitioning of the mesh's dual graph.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=idx_t), | intent(in) | :: | ne | The number of elements in the mesh. |
||
integer(kind=idx_t), | intent(in) | :: | nn | The number of nodes in the mesh. |
||
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eptr | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eind | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in), | optional | :: | vwgt(ne) | An array of size |
|
integer(kind=idx_t), | intent(in), | optional | :: | vsize(ne) | An array of size |
|
integer(kind=idx_t), | intent(in) | :: | ncommon | |||
integer(kind=idx_t), | intent(in) | :: | nparts | The number of parts to partition the mesh. |
||
integer(kind=idx_t), | intent(in), | optional | :: | tpwgts(nparts) | 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 either the edgecut or the total communication volume of the dual graph's partitioning. |
||
integer(kind=idx_t), | intent(out) | :: | epart(ne) | A vector of size |
||
integer(kind=idx_t), | intent(out) | :: | npart(nn) | 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 us used to partition a mesh into nparts
parts based on a
partitioning of the mesh's nodal graph.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=idx_t), | intent(in) | :: | ne | The number of elements in the mesh. |
||
integer(kind=idx_t), | intent(in) | :: | nn | The number of nodes in the mesh. |
||
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eptr | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eind | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in), | optional | :: | vwgt(nn) | An array of size |
|
integer(kind=idx_t), | intent(in), | optional | :: | vsize(nn) | An array of size |
|
integer(kind=idx_t), | intent(in) | :: | nparts | The number of parts to partition the mesh. |
||
integer(kind=idx_t), | intent(in), | optional | :: | tpwgts(nparts) | 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 either the edgecut or the total communication volume of the nodal graph's partitioning. |
||
integer(kind=idx_t), | intent(out) | :: | epart(ne) | A vector of size |
||
integer(kind=idx_t), | intent(out) | :: | npart(nn) | 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 computes fill reducing orderings of sparse matrices using the multilevel nested dissection algorithm.
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), | 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 | :: | vwgt(nvtxs) | An array of size |
|
integer(kind=idx_t), | intent(in), | optional | :: | options(METIS_NOPTIONS) | This is the array of options as described in Section 5.4 of the manual. See description for valid options. |
|
integer(kind=idx_t), | intent(out) | :: | perm(nvtxs) | Vectors of size |
||
integer(kind=idx_t), | intent(out) | :: | iperm(nvtxs) | Vectors 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 generate the dual graph of a mesh.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=idx_t), | intent(in) | :: | ne | The number of elements in the mesh. |
||
integer(kind=idx_t), | intent(in) | :: | nn | The number of nodes in the mesh. |
||
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eptr | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eind | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in) | :: | ncommon | The number of common nodes that two elements must have in order to put an edge between them in the dual graph. |
||
integer(kind=idx_t), | intent(in) | :: | numflag | Used to indicate which numbering scheme is used for |
||
type(c_ptr), | intent(out) | :: | xadj | These arrays store the adjacency structure of the generated dual graph. The format of the adjacency structure is described in Section 5.5 of the manual. |
||
type(c_ptr), | intent(out) | :: | adjncy | These arrays store the adjacency structure of the generated dual graph. The format of the adjacency structure is described in Section 5.5 of the manual. |
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 generate the nodal graph of a mesh.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=idx_t), | intent(in) | :: | ne | The number of elements in the mesh. |
||
integer(kind=idx_t), | intent(in) | :: | nn | The number of nodes in the mesh. |
||
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eptr | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in), | dimension(*) | :: | eind | The pair of arrays storing the mesh as described in Section 5.6 of the manual. |
|
integer(kind=idx_t), | intent(in) | :: | numflag | Used to indicate which numbering scheme is used for |
||
type(c_ptr), | intent(out) | :: | xadj | These arrays store the adjacency structure of the generated dual graph. The format of the adjacency structure is described in Section 5.5 of the manual. |
||
type(c_ptr), | intent(out) | :: | adjncy | These arrays store the adjacency structure of the generated dual graph. The format of the adjacency structure is described in Section 5.5 of the manual. |
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.
Initializes the options array into its default values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=idx_t), | intent(out) | :: | options(METIS_NOPTIONS) | The array of options that will be initialized. |
METIS_OK
- Indicates that the function returned normally.
Frees the memory that was allocated by either the METIS_MeshToDual or the METIS_MeshToNodal routines for returning the dual or nodal graph of a mesh.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | ptr | The pointer to be freed. This pointer should be one of the |
METIS_OK
- Indicates that the function returned normally.