Error: No partitioners available, Metis, undefined symbol: gk_jbufs

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 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,

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


$ export PYFR_METIS_LIBRARY_PATH="/some/path/"
$ pyfr partition -p metis ...

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

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

But now I have another error message:

Traceback (most recent call last):
  File "/cephyr/users/rubensd/Alvis/my_Rpython/bin/pyfr", line 8, in <module>
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/", line 118, in main
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/", 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/", 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/", line 140, in __init__
    self._wrappers = METISWrappers()
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/partitioners/", line 41, in __init__
    lib = load_library('metis')
  File "/cephyr/users/rubensd/Alvis/my_Rpython/lib/python3.9/site-packages/pyfr/", 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/", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /cephyr/users/rubensd/Alvis/local/lib/ undefined symbol: gk_jbufs

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

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

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

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,