# Partition error with scotch

**URL:** <https://pyfr.discourse.group/t/partition-error-with-scotch/1237>\
**Category:** Just Starting\
**Tags:** hpc\
**Created:** [25 March 2025 09:31 UTC](https://pyfr.discourse.group/t/partition-error-with-scotch/1237 "2025-03-25T09:31:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iagyonwu](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/iagyonwu/32/711_2.png) [@iagyonwu](https://pyfr.discourse.group/u/iagyonwu)\
**Post date:** [25 March 2025 09:31 UTC](https://pyfr.discourse.group/t/partition-error-with-scotch/1237/1 "2025-03-25T09:31:53Z")

</div>

Hello,  
I am trying the provided tutorial on HPC (HLRS hunter: [HLRS High Performance Computing Center Stuttgart: HPE Cray EX4000 (Hunter)](https://www.hlrs.de/solutions/systems/hunter)). In a interactive session, I was able to tun the tutorial with one GPU with the following command:

```auto
 pyfr -p run -b hip viscous-shock-tube.pyfrm viscous-shock-tube.ini

```

I suppose the above command will run the simulation with one GPU, right? Although I have 2 GPUs loaded.  
When I try to decompose the case into 2, as follows:

```auto
 pyfr partition -p scotch 2 euler-vortex.pyfrm .

```

I got the following error:

```auto
(pyfr_venv) iag44026 x1001c5s4b0n0 287$ pyfr partition -p scotch 2 euler-vortex.pyfrm .
Traceback (most recent call last):
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/bin/pyfr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 124, in main
    args.process(args)
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/ __main__.py", line 178, in process_partition
    part = get_partitioner(args.partitioner, pwts, ewts, opts=opts)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/partitioners/ __init__.py", line 8, in get_partitioner
    return subclass_where(BasePartitioner, name=name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/partitioners/scotch.py", line 90, in __init__
    self._wrappers = SCOTCHWrappers()
                     ^^^^^^^^^^^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/ctypesutil.py", line 16, in __init__
    self._lib = lib = self._load_library()
                      ^^^^^^^^^^^^^^^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/partitioners/scotch.py", line 31, in _load_library
    lib = super()._load_library()
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/ctypesutil.py", line 29, in _load_library
    return load_library(self._libname, self._mode)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/zhome/academic/HLRS/iag/iagyonwu/pyfr_venv/lib/python3.11/site-packages/pyfr/ctypesutil.py", line 55, in load_library
    return ctypes.CDLL(lpath, mode=mode)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/cray/pe/python/3.11.7/lib/python3.11/ctypes/ __init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /opt/hlrs/stack/testing-20250324/opt-spack/scotch/7.0.4-cce-18.0-xbu5xu67/lib/libscotch.so: undefined symbol: SCOTCH_errorPrint

```

The path to scotch:

```auto
(pyfr_venv) iag44026 x1001c5s4b0n0 299$ echo $PYFR_SCOTCH_LIBRARY_PATH
/opt/hlrs/stack/testing-20250324/opt-spack/scotch/7.0.4-cce-18.0-xbu5xu67/lib/libscotch.so

```

Does anyone have any clue, how can I partition my case?

Regards,  
Yongxiang

---

<div class="post-metadata">

**Author:** ![p.vincent](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/p.vincent/32/225_2.png) [@p.vincent](https://pyfr.discourse.group/u/p.vincent)\
**Post date:** [25 March 2025 09:47 UTC](https://pyfr.discourse.group/t/partition-error-with-scotch/1237/2 "2025-03-25T09:47:15Z")

</div>

I think this issue is discussed at the end of this thread: [PyFR 1.13.0: scotch mesh decomposition error](https://pyfr.discourse.group/t/pyfr-1-13-0-scotch-mesh-decomposition-error/553)
