Scotch partitioning doesn't work out of the box

I couldn’t immediately find an answer on the forum, so I thought writing this up may help another person. A similar error has been reported here but I thought a more explicit solution may be useful to some.

Problem: When partitioning with scotch you get one of the following errors:

  • RuntimeError: No partitioners available, or
  • OSError: .../libscotch.so: undefined symbol: SCOTCH_errorPrint

Solution

  1. Using the official repo obtain scotch. Tag version v7.0.9 worked for me
  2. Configure
    cmake \
      -DBUILD_SHARED_LIBS=ON \
      -DLIBSCOTCHERR=scotcherr \
      -DCMAKE_INSTALL_PREFIX=path/to/install \
      /path/to/scotch/source
    
  3. Point PyFR to Scotch install either via PYFR_SCOTCH_LIBRARY_PATH=pathto/install/lib64/libscotch.so or by updating LD_LIBRARY_PATH
  4. Run pyfr partition ...

I think this may save some people time and if at all possible it may be useful to have a sticky post which describes such common issues.

2 Likes

At least for SCOTCH most Linux distributions have prebuilt packages which are generally recommended and are built similarly to the above (so there are no issues with missing symbols).

This used to be the case for METIS until the 5.1.x and 5.2.x split where many distributions still do not ship the more recent version of METIS.

Regards, Freddie.