Skip to content

Metis

Metis provides programs and a library for partitioning graphs and meshes.

Metis is available as a module on Apocrita.

Usage

To use the default installed version of the Metis programs and library, simply load the metis module:

module load metis

Each of the Metis programs provides a help page, accessed with the -h command-line option, for example

gpmetis -h

Metis provides an API with C, C++ and Fortran bindings. The module provides the environment variable ${METIS} which can be used in specifying search paths when compiling and linking programs:

gcc -o metis-test metis-test.c -I${METIS}/include -L${METIS}/lib -lmetis

The installed autoconf-archive contains a macro AX_LIB_METIS which can be used in an Autoconf script to determine the appropriate compiler flags for building against the Metis library.

Example job

The following job uses gpgmetis to partition a graph into two parts. The input graph is given in the file 1.gph and the resulting output file will be called 1.gph.part.2.

#!/bin/bash
#SBATCH -n 1               # (or --ntasks=1) Request 1 core
#SBATCH --mem-per-cpu=1G   # Request 1GB RAM per core
#SBATCH -t 1:0:0           # Request 1 hour runtime

module load metis

gpmetis 1.gph 2

References