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

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

ie

$ export PYFR_METIS_LIBRARY_PATH="/some/path/libmetis.so"
$ 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/libmetis.so
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>
    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

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

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

Can you please share your mesh file?

Regards, Freddie.