# Error: No partitioners available, Metis, undefined symbol: gk\_jbufs

**URL:** <https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919>\
**Category:** Errors\
**Tags:** partition\
**Created:** [12 September 2023 09:51 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919 "2023-09-12T09:51:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubens](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@rubens](https://pyfr.discourse.group/u/rubens)\
**Post date:** [12 September 2023 09:51 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/1 "2023-09-12T09:51:21Z")

</div>

Good morning, I’m trying to partition a mesh (in particular I´m running the Euler Vortex example case), but it always give me back this error:

`RuntimeError: No partitioners available`

I installed METIS and a libmetis.so is available in my `~/local/lib` directory, but the error still occurs.  
I read in another similar topic that I should add the line `export LD_LIBRARY_PATH=/path/to/your/metis/lib:$LD_LIBRARY_PATH` to solve the problem, but where should I add it?  
I´m sorry if I´m being “stupid”, but these are really my first steps in the programming world.  
I´d be grateful if someone could help me.

Kind Regards,  
Rubens

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [12 September 2023 11:19 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/2 "2023-09-12T11:19:47Z")

</div>

You might need to explicitly set `PYFR_METIS_LIBRARY_PATH` to location of the metis `.so`/`.dylib`

ie

```bash
$ export PYFR_METIS_LIBRARY_PATH="/some/path/libmetis.so"
$ pyfr partition -p metis ...

```

---

<div class="post-metadata">

**Author:** ![rubens](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@rubens](https://pyfr.discourse.group/u/rubens)\
**Post date:** [12 September 2023 11:51 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/3 "2023-09-12T11:51:05Z")

</div>

Thank you for your reply Will!  
I entered this two lines as you suggested:

```auto
export PYFR_METIS_LIBRARY_PATH=/cephyr/users/rubensd/Alvis/local/lib/libmetis.so
pyfr partition -p metis 2 2d-euler-vortex.pyfrm .

```

But now I have another error message:

```bash
Traceback (most recent call last):
  File "/cephyr/users/rubensd/Alvis/my_Rpython/bin/pyfr", line 8, in <module>
    sys.exit(main())
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/ __main__.py", line 118, in main
    args.process(args)
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/ __main__.py", line 160, in process_partition
    part = get_partitioner(args.partitioner, pwts, ewts, opts=opts)
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/partitioners/ __init__.py", line 10, in get_partitioner
    return subclass_where(BasePartitioner, name=name)(*args, **kwargs)
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/partitioners/metis.py", line 140, in __init__
    self._wrappers = METISWrappers()
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/partitioners/metis.py", line 41, in __init__
    lib = load_library('metis')
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/ctypesutil.py", line 51, in load_library
    return ctypes.CDLL(lpath)
  File "/apps/Arch/software/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/ctypes/ __init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /cephyr/users/rubensd/Alvis/local/lib/libmetis.so: undefined symbol: gk_jbufs

```

I hope there is a way to solve this.  
Kind regards,  
Rubens

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [12 September 2023 12:00 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/4 "2023-09-12T12:00:21Z")

</div>

Did you compile metis yourself by any chance? There is a bug that was introduced into the build system of Metis recently and you’ll need add this patch: [Link shared metis lib against GKlib by catap · Pull Request #52 · KarypisLab/METIS · GitHub](https://github.com/KarypisLab/METIS/pull/52)

Also, it looks like you are using python 3.9; you’ll need to upgrade to Python\>=3.10.

---

<div class="post-metadata">

**Author:** ![rubens](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@rubens](https://pyfr.discourse.group/u/rubens)\
**Post date:** [14 September 2023 12:25 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/5 "2023-09-14T12:25:33Z")

</div>

Thank you Will! In the end, I solved it partitioning the mesh on the local machine and running an higher version of python.  
Kind regards,  
Rubens

---

<div class="post-metadata">

**Author:** ![dav\_ax](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dav\_ax](https://pyfr.discourse.group/u/dav_ax)\
**Post date:** [4 August 2024 09:54 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/6 "2024-08-04T09:54:17Z")

</div>

Hi to everyone,  
I had the same problem and it has been solved with the new commit. However now it turns out into this:

pyfr partition -p metis -e balanced 256 mesh222d256.pyfrm .

File “/cfs/klemming/home/a/acierno/.conda/envs/pyfr\_2\_dev/lib/python3.10/site-packages/pyfr-2.0.2-py3.10.egg/pyfr/ **main**.py”, line 124, in main  
File “/cfs/klemming/home/a/acierno/.conda/envs/pyfr\_2\_dev/lib/python3.10/site-packages/pyfr-2.0.2-py3.10.egg/pyfr/ **main**.py”, line 190, in process\_partition  
File “/cfs/klemming/home/a/acierno/.conda/envs/pyfr\_2\_dev/lib/python3.10/site-packages/pyfr-2.0.2-py3.10.egg/pyfr/partitioners/base.py”, line 388, in partition  
File “/cfs/klemming/home/a/acierno/.conda/envs/pyfr\_2\_dev/lib/python3.10/site-packages/pyfr-2.0.2-py3.10.egg/pyfr/partitioners/base.py”, line 152, in \_construct\_graph  
File “/cfs/klemming/home/a/acierno/.conda/envs/pyfr\_2\_dev/lib/python3.10/site-packages/pyfr-2.0.2-py3.10.egg/pyfr/partitioners/base.py”, line 152, in   
KeyError: ‘’

Does anyone have any clue? Thanks

---

<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:** [4 August 2024 11:58 UTC](https://pyfr.discourse.group/t/error-no-partitioners-available-metis-undefined-symbol-gk-jbufs/919/7 "2024-08-04T11:58:47Z")

</div>

Can you please share your mesh file?

Regards, Freddie.
