Installation

Quick-start

PyFR 1.12.3 can be installed using pip and virtualenv, as shown in the quick-start guides below.

Alternatively, PyFR 1.12.3 can be installed from source, see Compiling from source.

macOS

We recommend using the package manager homebrew. Open the terminal and install the dependencies with the following commands:

brew install python3 open-mpi metis
pip3 install virtualenv

For visualisation of results, either install ParaView from the command line:

brew cask install paraview

or dowload the app from the ParaView website. Then create a virtual environment and activate it:

virtualenv --python=python3 ENV3
source ENV3/bin/activate

Finally install PyFR with pip in the virtual environment:

pip install pyfr

This concludes the installation. In order to run PyFR with the OpenMP backend (see Running PyFR), use the following settings in the Configuration File (.ini):

[backend-openmp]
cc = gcc-8

Note the version of the compiler which must support the openmp flag. This has been tested on macOS 11.6 for ARM and Intel CPUs.

Ubuntu

Open the terminal and install the dependencies with the following commands:

sudo apt install python3 python3-pip libopenmpi-dev openmpi-bin
sudo apt install metis libmetis-dev
pip3 install virtualenv

For visualisation of results, either install ParaView from the command line:

sudo apt install paraview

or dowload the app from the ParaView website. Then create a virtual environment and activate it:

python3 -m virtualenv pyfr-venv
source pyfr-venv/bin/activate

Finally install PyFR with pip in the virtual environment:

pip install pyfr

This concludes the installation.

This has been tested on Ubuntu 20.04.

Compiling from source

PyFR can be obtained here. To install the software from source, use the provided setup.py installer or add the root PyFR directory to PYTHONPATH using:

user@computer ~/PyFR$ export PYTHONPATH=.:$PYTHONPATH

When installing from source, we strongly recommend using pip and virtualenv to manage the Python dependencies.

Dependencies

PyFR 1.12.3 has a hard dependency on Python 3.9+ and the following Python packages:

  1. appdirs >= 1.4.0

  2. gimmik >= 2.0

  3. h5py >= 2.10

  4. mako >= 1.0.0

  5. mpi4py >= 3.0

  6. numpy >= 1.20

  7. pytools >= 2016.2.1

Note that due to a bug in NumPy, PyFR is not compatible with 32-bit Python distributions.

CUDA Backend

The CUDA backend targets NVIDIA GPUs with a compute capability of 3.0 or greater. The backend requires:

  1. CUDA >= 8.0

HIP Backend

The HIP backend targets AMD GPUs which are supported by the ROCm stack. The backend requires:

  1. ROCm >= 4.5.0

  2. rocBLAS >= 2.41.0

OpenCL Backend

The OpenCL backend targets a range of accelerators including GPUs from AMD, Intel, and NVIDIA. The backend requires:

  1. OpenCL

  2. pyopencl >= 2015.2.4

  3. CLBlast

OpenMP Backend

The OpenMP backend targets multi-core CPUs. The backend requires:

  1. GCC >= 4.9 or another C compiler with OpenMP support

  2. Optionally libxsmm >= commit 14b6cea61376653b2712e3eefa72b13c5e76e421 compiled as a shared library (STATIC=0) with BLAS=0 and CODE_BUF_MAXSIZE=262144

In order for PyFR to find libxsmm it must be located in a directory which is on the library search path. Alternatively, the path can be specified explicitly by exporting the environment variable PYFR_XSMM_LIBRARY_PATH=/path/to/libxsmm.so.

Parallel

To partition meshes for running in parallel it is also necessary to have one of the following partitioners installed:

  1. METIS >= 5.0

  2. SCOTCH >= 6.0

In order for PyFR to find these libraries they must be located in a directory which is on the library search path. Alternatively, the paths can be specified explicitly by exporting the environment variables PYFR_METIS_LIBRARY_PATH=/path/to/libmetis.so and/or PYFR_SCOTCH_LIBRARY_PATH=/path/to/libscotch.so.