# RuntimeError: No partitioners available

**URL:** <https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060>\
**Category:** Errors\
**Tags:** partition\
**Created:** [15 March 2024 00:58 UTC](https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060 "2024-03-15T00:58:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jung9053](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jung9053](https://pyfr.discourse.group/u/jung9053)\
**Post date:** [15 March 2024 00:58 UTC](https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060/1 "2024-03-15T00:58:24Z")

</div>

Hello,

I was able to run single mesh cases using PyFR and now  
I am trying to follow the example " 2D Euler Vortex" case for partitioning case.

I’ve installed METIS from below link and set path “PYFR\_METIS\_LIBRARY\_PATH=”.

> **[GitHub - KarypisLab/METIS: METIS - Serial Graph Partitioning and...](https://github.com/KarypisLab/METIS)**
>
> METIS - Serial Graph Partitioning and Fill-reducing Matrix Ordering - KarypisLab/METIS

But, I got the following error after command for grid partition as shown below.

Please let me know how I can fix this…  
Thanks!

```auto
$ pyfr partition 2 euler-vortex.pyfrm .
Traceback (most recent call last):
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/bin/pyfr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 124, in main
    args.process(args)
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 187, in process_partition
    raise RuntimeError('No partitioners available')

```

---

<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:** [15 March 2024 13:32 UTC](https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060/2 "2024-03-15T13:32:15Z")

</div>

Please apply:

> <https://github.com/KarypisLab/METIS/pull/77>

and recompile METIS.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![jung9053](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jung9053](https://pyfr.discourse.group/u/jung9053)\
**Post date:** [18 March 2024 06:16 UTC](https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060/3 "2024-03-18T06:16:12Z")

</div>

Thanks! Now, the partitioning works.

For parallel computing, I’ve install gcc 13.1.0 and the latest version of “libxsmm”.  
path also included as `PYFR_XSMM_LIBRARY_PATH=/path/to/libxsmm.so`

But for the same example case, I got the following error after command for parallel computing.  
`mpiexec -n 2 pyfr -p run -b cuda euler-vortex.pyfrm euler-vortex.ini`

Please let me know how I can fix this…  
Thanks!

```auto
Traceback (most recent call last):
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/bin/pyfr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 124, in main
    args.process(args)
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 258, in process_run
    _process_common(
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 240, in _process_common
    rallocs = get_rank_allocation(mesh, cfg)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/rank_allocator.py", line 12, in get_rank_allocation
    return subclass_where(BaseRankAllocator, name=name)(mesh, cfg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/rank_allocator.py", line 29, in __init__
    raise RuntimeError(f'Mesh has {nparts} partitions but running '
RuntimeError: Mesh has 2 partitions but running with 1 MPI ranks
Traceback (most recent call last):
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/bin/pyfr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 124, in main
    args.process(args)
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 258, in process_run
    _process_common(
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 240, in _process_common
    rallocs = get_rank_allocation(mesh, cfg)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/rank_allocator.py", line 12, in get_rank_allocation
    return subclass_where(BaseRankAllocator, name=name)(mesh, cfg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yongsu/Research/CFD/PyFR/libxsmm/pyfr-venv/lib/python3.11/site-packages/pyfr/rank_allocator.py", line 29, in __init__
    raise RuntimeError(f'Mesh has {nparts} partitions but running '

```

---

<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 March 2024 10:48 UTC](https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060/4 "2024-03-18T10:48:44Z")

</div>

This is likely an `mpi4py` problem. Please run `mpiexec -np 3 python -c 'from mpi4py import MPI; print(MPI.COMM_WORLD.rank)'`.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![jung9053](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jung9053](https://pyfr.discourse.group/u/jung9053)\
**Post date:** [20 March 2024 05:14 UTC](https://pyfr.discourse.group/t/runtimeerror-no-partitioners-available/1060/5 "2024-03-20T05:14:30Z")

</div>

problem solved! thank you!
