inducer / inducer/pymetis

Contiguous option doesn't seem to work.

Open
#60 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
202
Forks
37
Avg merge
8h 44m
Merged PRs (30d)
1

Description

**Describe the bug**
Passing the contiguous option in create_parts, either via the argument in the method or passing an `Options` object with `contig` set to True, doesn't seem to actually return contiguous partitions.

**To Reproduce**
Run metis part with the contig option in one of these ways:
```python
metis_opts = Options()
metis_opts.contig = True
edgecuts, parts = part_graph(
numparts, xadj=xadj, adjncy=adjncy,
options=metis_opts,
)
```
```python
edgecuts, parts = part_graph(
numparts, xadj=xadj, adjncy=adjncy,
contiguous=True,
)
```

**Expected behavior**
The resulting partitions should be contiguous.

**Environment (please complete the following information):**
- OS: Windows (with Anaconda)
- Python version: 3.10
- pymetis version: 2023.1.1

**Additional context**
Image of the resulting partitions from a street map graph (each color = different partition):
![partitions](https://github.com/inducer/pymetis/assets/3884952/07d42baa-16d2-48b5-a322-b93f08be001a)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Python part_graph/create_parts entry points and inspect how the contiguous or contig setting from the Options object is passed through. Reproduce the issue with the provided street-map case or the shown calls, then verify that each returned partition is contiguous as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.