ParMETIS does not define its own integer or floating-point widths. Instead, it inherits them directly from METIS: when METIS is built, its headerDocumentation 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.
metis/include/metis.h defines idx_t and real_t using the IDXTYPEWIDTH and REALTYPEWIDTH constants. ParMETIS reads those same definitions at compile time and selects the corresponding MPI datatypes. This means the type widths for your entire stack — GKlib, METIS, ParMETIS, and your application — are all controlled by a single configuration point in metis/include/metis.h.
Integer type: idx_t
idx_t is the integer type used for vertex counts, adjacency lists, partition vectors, and all other integer data passed across the ParMETIS API.
- 32-bit (IDXTYPEWIDTH=32)
- 64-bit (IDXTYPEWIDTH=64)
Set
IDXTYPEWIDTH 32 in metis/include/metis.h.idx_tresolves to a 32-bit integer.- ParMETIS maps it to
MPI_INTfor communication. KEEP_BITis set to0x40000000L.
Floating-point type: real_t
real_t is the floating-point type used for partition weights (tpwgts), imbalance tolerances (ubvec), and geometry coordinates (xyz).
- 32-bit (REALTYPEWIDTH=32)
- 64-bit (REALTYPEWIDTH=64)
Set
REALTYPEWIDTH 32 in metis/include/metis.h.real_tresolves tofloat.- ParMETIS maps it to
MPI_FLOATfor communication.
Full definitions from parmetis.h
The complete preprocessor block ininclude/parmetis.h that selects MPI types based on the METIS-defined widths:
IDXTYPEWIDTH or REALTYPEWIDTH is set to any value other than 32 or 64, the header emits a compile-time #error.
How to configure type widths
Edit metis/include/metis.h
Open the METIS header and set
IDXTYPEWIDTH and REALTYPEWIDTH to the desired widths (32 or 64).Build and install METIS
Rebuild METIS from source so the header changes take effect in the installed library.
Build and install ParMETIS
Build ParMETIS pointing at the freshly installed METIS. ParMETIS picks up the type widths automatically at compile time.
Platform constraints
On 32-bit platforms, only
IDXTYPEWIDTH=32 is supported. On 64-bit platforms, both 32-bit and 64-bit widths are supported.