# Mesh partition error

**URL:** <https://pyfr.discourse.group/t/mesh-partition-error/1061>\
**Category:** General\
**Created:** [15 March 2024 14:39 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061 "2024-03-15T14:39:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 March 2024 14:39 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/1 "2024-03-15T14:39:49Z")

</div>

Hello, I began to run the pyfr 2.0, versions up to 2.0 run normally. When I did the mesh partition by **pyfr partition 30 a.pyfrm .** , it comes error.

Traceback (most recent call last):  
File “/home/pyfr-2.0/bin/pyfr”, line 8, in   
sys.exit(main())  
File “/home/pyfr-2.0/lib/python3.10/site-packages/pyfr/ **main**.py”, line 124, in main  
args.process(args)  
File “/home/pyfr-2.0/lib/python3.10/site-packages/pyfr/ **main**.py”, line 190, in process\_partition  
mesh, rnum, part\_soln\_fn = part.partition(mesh, args.progress)  
File “/home/pyfr-2.0/lib/python3.10/site-packages/pyfr/partitioners/base.py”, line 393, in partition  
vparts = self.\_partition\_graph(graph, self.partwts).tolist()  
File “/home/pyfr-2.0/lib/python3.10/site-packages/pyfr/partitioners/metis.py”, line 166, in \_partition\_graph  
part\_graph\_fn(  
File “/home/pyfr-2.0/lib/python3.10/site-packages/pyfr/ctypesutil.py”, line 37, in \_errcheck  
raise self.\_statuses[status]  
pyfr.partitioners.metis.METISErrorInput

And I didn’t install the metis, so I tried to install metis. I used this patch2 packeg, but the error come out , which is attached below. Could someone help me solve it?

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

---

<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:** [15 March 2024 14:45 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/3 "2024-03-15T14:45:31Z")

</div>

I’m pretty sure that this is due to metis not being linked to gklib, you should be able to check by using `ldd` on the `libmetis.so`

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 March 2024 14:56 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/4 "2024-03-15T14:56:38Z")

</div>

I am not sure if you had seen the error, when I use commond **cmake -DCMAKE\_INSTALL\_PREFIX=/path/to/install** in the build file, the error comes out.

 ![f31bed45607db4544e8c6d5b8a33075e_720](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/b4fc33bc5075c277520eb9136978fae2c82054d0.png)

---

<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 15:16 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/5 "2024-03-15T15:16:37Z")

</div>

As per the install guide:

[https://pyfr.readthedocs.io/en/latest/installation.html#parallel](https://pyfr.readthedocs.io/en/latest/installation.html#parallel)

PyFR v2 now requires 5.2 of METIS.

Regards, Freddie.

PS This is **not** a METIS support forum. If you require support with compiling METIS please open an issue here: [GitHub - KarypisLab/METIS: METIS - Serial Graph Partitioning and Fill-reducing Matrix Ordering](https://github.com/KarypisLab/METIS)

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 March 2024 15:17 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/6 "2024-03-15T15:17:48Z")

</div>

On the other hand, could you tell me how to check by using `ldd` on the `libmetis.so`?

With best regards

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 March 2024 15:20 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/7 "2024-03-15T15:20:08Z")

</div>

Yes, I also tried the METIS-5.2.1, it comes out the same error.

---

<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 18:29 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/8 "2024-03-15T18:29:37Z")

</div>

It is almost certain that you have the incorrect version of METIS. This exact error is known to be caused through use of 5.1.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![nnunn](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@nnunn](https://pyfr.discourse.group/u/nnunn)\
**Post date:** [16 March 2024 14:10 UTC](https://pyfr.discourse.group/t/mesh-partition-error/1061/9 "2024-03-16T14:10:51Z")

</div>

Hi @fei,  
In the current git version of metis, at the end of file **metis/CMakeLists.txt** I find these 4 lines:

```auto
# Recursively look for CMakeLists.txt in subdirs.
add_subdirectory("build/xinclude")
add_subdirectory("libmetis")
add_subdirectory("programs")

```

If the subdirectory “build/xinclude” does not exist, hide that line with # character  
PS: I use windows and do not have that subdirectory.
