ParMETIS is distributed as source code and must be compiled on the target system. The build system uses CMake and GNU Make. You must first install a C compiler, MPI library, and the two upstream dependencies (GKlib and METIS) before building ParMETIS itself.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KarypisLab/ParMETIS/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
You need the following tools available on your system before you begin:| Requirement | Minimum version | Notes |
|---|---|---|
| C compiler (gcc) | C99 support | Other C99-compliant compilers also work |
| CMake | 2.8 | Required by the build system |
| MPI library | Any | MPICH and OpenMPI are both supported |
| GKlib | Latest | Must be installed before METIS |
| METIS | Latest | Must be built with the same integer/float widths as ParMETIS |
ParMETIS, METIS, and GKlib must all use the same data type widths (32-bit or 64-bit integers and floating-point numbers). The widths are set in METIS’
include/metis.h via the IDXTYPEWIDTH and REALTYPEWIDTH constants.Installation steps
Install system dependencies
On Ubuntu or Debian, install the compiler toolchain, CMake, and an MPI library with After installation, verify your MPI compiler wrapper is available:
apt-get.Install GKlib
Clone the GKlib repository and install it to your chosen prefix. The example below uses
~/local as the install prefix, which is also the default for ParMETIS.Install METIS
Clone and build METIS. Use the same prefix as GKlib so that ParMETIS can find both automatically.
Before building METIS, you can set the integer and floating-point data type widths by editing
include/metis.h and setting IDXTYPEWIDTH to 32 or 64. ParMETIS inherits these widths automatically. On 32-bit systems, only IDXTYPEWIDTH=32 is supported.Clone and configure ParMETIS
Clone the ParMETIS repository, then run If GKlib and METIS were installed to a different prefix than
make config to generate the CMake build files. Pass cc=mpicc to ensure the MPI compiler wrapper is used.~/local, specify their paths explicitly:Build and install
Compile the library and install the binaries, headers, and library files:The following output directories are created under your install prefix:
| Directory | Contents |
|---|---|
~/local/bin | Command-line programs |
~/local/include | Header file (parmetis.h) |
~/local/lib | Static or shared library (libparmetis.a / libparmetis.so) |
Configuration options
Pass these options tomake config to customize the build.
Core options
The C compiler to use. Set to
mpicc (or your MPI compiler wrapper) to enable MPI support.Set to
1 to build a shared library (libparmetis.so) instead of the default static library (libparmetis.a).The installation root. Headers go to
PREFIX/include, libraries to PREFIX/lib, and programs to PREFIX/bin.The prefix where GKlib is installed. Omit this if GKlib was installed to the same prefix as ParMETIS.
The prefix where METIS is installed. Omit this if METIS was installed to the same prefix as ParMETIS.
Debug options
These options are intended for development and testing. They reduce performance and should not be used in production builds.Set to
1 to include GDB debug symbols in the build.Set to
1 to enable general debugging support.Set to
1 to enable internal assertions.Set to
1 to enable very expensive internal assertions. Only use this when diagnosing deep bugs.Other make commands
| Command | Effect |
|---|---|
make uninstall | Removes all files placed by make install. |
make clean | Removes compiled object files but keeps the CMake configuration. |
make distclean | Removes all object files and the build directory. Run before reconfiguring from scratch. |