# Scotch partitioning doesn't work out of the box

**URL:** <https://pyfr.discourse.group/t/scotch-partitioning-doesnt-work-out-of-the-box/1299>\
**Category:** Uncategorised\
**Tags:** mesh, hpc, partition\
**Created:** [18 September 2025 13:02 UTC](https://pyfr.discourse.group/t/scotch-partitioning-doesnt-work-out-of-the-box/1299 "2025-09-18T13:02:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlmostSurelyRob](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/almostsurelyrob/32/446_2.png) [@AlmostSurelyRob](https://pyfr.discourse.group/u/AlmostSurelyRob)\
**Post date:** [18 September 2025 13:02 UTC](https://pyfr.discourse.group/t/scotch-partitioning-doesnt-work-out-of-the-box/1299/1 "2025-09-18T13:02:27Z")

</div>

I couldn’t immediately find an answer on the forum, so I thought writing this up may help another person. A similar error has been reported [here](https://pyfr.discourse.group/t/pyfr-1-13-0-scotch-mesh-decomposition-error/553) but I thought a more explicit solution may be useful to some.

**Problem** : When partitioning with scotch you get one of the following errors:

- `RuntimeError: No partitioners available`, or
- `OSError: .../libscotch.so: undefined symbol: SCOTCH_errorPrint`

**Solution**

1. Using the official [repo](https://gitlab.inria.fr/scotch/scotch) obtain scotch. Tag version v7.0.9 worked for me
2. Configure

```bash
cmake \
  -DBUILD_SHARED_LIBS=ON \
  -DLIBSCOTCHERR=scotcherr \
  -DCMAKE_INSTALL_PREFIX=path/to/install \
  /path/to/scotch/source

```

3. Point PyFR to Scotch install either via `PYFR_SCOTCH_LIBRARY_PATH=pathto/install/lib64/libscotch.so` or by updating `LD_LIBRARY_PATH`
4. Run `pyfr partition ...`

I think this may save some people time and if at all possible it may be useful to have a [sticky](https://en.wikipedia.org/wiki/Internet_forum#Stickying) post which describes such common issues.

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [18 September 2025 18:42 UTC](https://pyfr.discourse.group/t/scotch-partitioning-doesnt-work-out-of-the-box/1299/2 "2025-09-18T18:42:22Z")

</div>

At least for SCOTCH most Linux distributions have prebuilt packages which are generally recommended and are built similarly to the above (so there are no issues with missing symbols).

This used to be the case for METIS until the 5.1.x and 5.2.x split where many distributions still do not ship the more recent version of METIS.

Regards, Freddie.
