[KaHIPApplication] Introduction of KaHIPApplication for high-quality graph partitioning#14453
Open
loumalouomega wants to merge 55 commits into
Open
[KaHIPApplication] Introduction of KaHIPApplication for high-quality graph partitioning#14453loumalouomega wants to merge 55 commits into
loumalouomega wants to merge 55 commits into
Conversation
…memory mesh partitioning
auto-merge was automatically disabled
May 23, 2026 16:06
Pull request was converted to draft
…bility with kaffpa
This commit introduces a new test case in the form of a .mdpa file, which includes nodes, elements, conditions, and conditional data for a 2D quadrilateral mesh. The test case is designed to validate the functionality of the KaHIPApplication with respect to handling 2D mesh structures.
… quality comparison details
…d pre-generated plots; add new quality comparison images for cube and quads meshes.
…se partitions from 4 to 8
…d include ParHIP libraries if available
Member
Author
|
Okay, this is ready, I tested and the fast mode is not significantly better than Metis, but is MPI ready... |
Member
Author
|
Okay, this is ready for review |
Member
|
Looks good also from my side, not very into MPI nowadays, but if you need something added to the images I can add it |
Member
Author
I added automatic download in case not defined the lib, That's why I could add it to CI, and looks like it works. The library is small so the penalty of compiling is not that high, but if you prefer we can add it to the images |
Member
|
@KratosMultiphysics/technical-committee agrees with the addition of the library and assigns @roigcarlo to review it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
name: ✨ Feature
about: Introduction of KaHIPApplication for high-quality graph partitioning
📝 Description
This Pull Request introduces the
KaHIPApplication, a new partitioning tool for Kratos Multiphysics based on the Karlsruhe High Quality Partitioning (KaHIP) framework. It is designed as a high-performance, drop-in alternative to the existingMetisApplication, offering superior edge-cut reduction for parallel computations.Comparison
The resulñts, at least in these examples, are similar to the one obtained with Metis. Feel free to test with more complex meshes.
Cube
Quad
Why KaHIP?
While METIS is a standard in the industry, KaHIP provides several key advantages for our users:
ecoconfiguration is comparable in speed to METIS but typically produces 5–20% fewer edge cuts on FEM meshes.strongconfiguration allows for even lower edge cuts for users who prioritize communication efficiency over partitioning time..mdpafiles on disk.Basic usage example
Using the new high-level Modeler is straightforward:
Technical Details & Prerequisites
Dependencies: Requires KaHIP ≥ v3.25 (included in-tree by default) and OpenMP.
Build Configuration: Can be enabled via
add_appin your configure script. Supports optional 64-bit edge indices for massive meshes:Key changes
KaHIPDivideHeterogeneousInputProcessthat mirror the interface of their Metis counterparts.KaHIPPartitioningModeler, a high-level API that handles the entire "partition-and-read" workflow in a single step.fast,eco,strong, etc.) and imbalance controls via KratosParameters.Validation
I have included comprehensive tests covering both serial and MPI workflows. You can run them using the following commands:
🆕 Changelog
KaHIPApplication, providing high-quality graph partitioning based on the Karlsruhe High Quality Partitioning (KaHIP) framework.KaHIPDivideHeterogeneousInputProcess: A serial partitioner designed as a drop-in replacement forMetisDivideHeterogeneousInputProcess.KaHIPDivideHeterogeneousInputInMemoryProcess: An MPI-aware process for in-memory partitioning and distribution viaMPI_Scatterv, eliminating the need for intermediate files.KaHIPPartitioningModeler, a streamlined modeler to automate the "partition-and-read" workflow in a single Python call.external_libraries/KaHIP).fast,eco,strong,fastsocial,ecosocial, andstrongsocial.-DKAHIP_64BIT=ONfor partitioning meshes with more than (2^{31}) edges.kratos_run_tests.py.