Installation

DOLFINx can be installed using various packages managers, run using containers, or built manually from source.

Spack is the recommended installation tool for high performance computers

Spack

See README.md for instructions.

Docker

A nightly Docker container is provided at https://hub.docker.com/r/dolfinx/dolfinx. The Dockerfile provides a definitive build recipe. See README.md for instructions.

Versioned Docker images will be provided in the future.

Debian/Ubuntu packages

The Debian/Ubuntu package is fenics-dolfinx. The Ubuntu PPA is at https://launchpad.net/~fenics-packages/+archive/ubuntu/fenics and Debian packages are at https://packages.debian.org/search?keywords=python3%2Ddolfinx.

Conda

Under development

pip

Under development

Source

Installation of DOLFINx requires installation of the C++ core. Most users will also want the Python interface.

Dependencies

C++ core

Required

  • C++ compiler (supporting the C++17 standard)

  • Boost, with the following compiled Boost components

    • timer

  • CMake [build dependency]

  • xtensor

  • pkg-config

  • Basix

  • UFCx [ufcx.h, provided by FFCx]

  • MPI

  • HDF5 (with MPI support enabled)

  • PETSc 1

  • At least one of ParMETIS 2, KaHIP or PT-SCOTCH 2

From ParMETIS, KaHIP or PT-SCOTCH, ParMETIS is recommended.

Optional

  • ADIOS2 (additional parallel IO support)

  • SLEPc (eigenvalue computations)

Python interface

Below are additional requirements for the Python interface.

Required

Suggested

  • pyvista (for plotting)

  • Numba

  • slepc4py

Building and installing

C++ core

The C++ core is built using CMake. Create a build directory in cpp/, e.g. mkdir -p build/ and in the build run directory:

cmake ../
make install

To set the installation prefix:

cmake -DCMAKE_INSTALL_PREFIX=<my-install-path> ../
make install

Python

After installation of the C++ core, from the python/ directory the Python interface can be installed using:

pip install .

Footnotes

1

Its is recommended to configure with ParMETIS, PT-SCOTCH, MUMPS and Hypre using the --download-parmetis --download-ptscotch --download-suitesparse --download-mumps --download-hypre

2(1,2)

PETSc can download and configure and build these libraries.