Installation instructions and further information on deal.II

  1. System requirements
    1. Supported platforms
    2. Additional software requirements
  2. Installation
    1. Unpacking
    2. Configuring and building the library
    3. Configuring and building the documentation
    4. Configuration options
      1. Selecting optional behavior
      2. Optional interfaces to other software packages
      3. More information on configuring and building the library
  3. License

System requirements

Supported platforms

deal.II is mostly developed on Linux using the GCC compiler. However, it is not platform specific and we strive to keep the source code C++ Standard compliant.

deal.II supports at least the following platforms:

Most other combinations of POSIX-style operating systems and C++ Standard compliant compilers should also work. If they don't, please report it as a bug.

Additional software requirements

In order to compile and use deal.II you need to have the following programs installed:

Installation

Unpacking

The whole library usually comes as a tar.gz file, which is a file archive compressed with gzip. After downloading it, unpack it using either

  gunzip deal.II-X.Y.Z.tar.gz
  tar xf deal.II-X.Y.Z.tar

or, if you have GNU tar with

  tar -xvf deal.II-X.Y.Z.tar.gz

Note: You will want to hang on to the source files of deal.II after installation as it makes developing much simpler. Consequently, you should do the steps above in a permanent directory, not on /tmp as one often does when installing software.

Configuring and building the library

deal.II uses the CMake integrated configuration and build system. Unpacking will create a subdirectory deal.II/ in the current directory. Then do the following steps:

  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/dir ../deal.II
  make install
  make test

These steps compile, link, install the deal.II library, and run a few consistency checks. The whole process should take between a few minutes and an hour, depending on your machine.

Note:

The commands above build and install the deal.II libraries in two variants:

At this point, you have generated everything necessary to write programs based on deal.II. If you are new to deal.II, you may want to continue with the tutorial.

Configuring and building the documentation

All the documentation about the version that you downloaded and that can be found at the http://www.dealii.org/ domain can also be generated locally. To do so, invoke cmake in the build instructions above as follows:

  cmake -DDEAL_II_COMPONENT_DOCUMENTATION=ON -DCMAKE_INSTALL_PREFIX=/path/install/dir ../deal.II

For this to succeed, you will need Perl 5.x, doxygen and dot (which is part of the GraphViz package) to be installed.

Upon calling make and make install, this will install both this readme, other installation instructions, as well as the manual that documents all functions and classes as well as the tutorial of well-documented example programs (the "steps").

Note: Generating this documentation can take a really long time — running doxygen through our hundreds of thousands of lines of code can take 15-20 minutes even on a fast machine during which you will not get any output from make.

Configuration options

deal.II has a large number of optional interfaces to other libraries. By default, cmake will automatically enable support for all external libraries it can find in default paths. However, this behavior can be changed using command line switches to the initial call to cmake. A detailed description can be found here: Detailed build system description.

In the following, let us summarize the most common configuration options.

Selecting optional behavior

Optional interfaces to other software packages

When configuring interfacing to external libraries, the cmake script by default tries to find all of these libraries in a number of standard locations on your file system. For optional interfaces, it gives up if the library is not found and deal.II will be built without support for them. However, there is one interface that we need to have: BOOST. If it is not found externally cmake will resort to the bundled boost version that is part of the deal.II tar file.

The following paragraphs describe how the interfaces to the various packages, deal.II interacts with, can be configured.

Notes:

ARPACK

ARPACK is a library for computing large scale eigenvalue problems. ARPACK should be readily packaged by most Linux distributions. (Don't forget to install a development version of the library). To use a self compiled version, specify -DARPACK_DIR=/path/to/arpack on the command line. For a detailed description on how to compile ARPACK and linking with deal.II, see this page.

BLAS, LAPACK

BLAS (the Basic Linear Algebra Subroutines) and LAPACK (Linear Algebra Package) are two packages that support low-level linear algebra operations on vectors and dense matrices. Both libraries should be packaged by almost all Linux distributions and found automatically whenever available. (You might have to install development versions of the libraries for deal.II being able to use them). For details on how to set up deal.II with a non standard BLAS/LAPACK implementation, see the advanced setup section in the CMake ReadME.

HDF5

The HDF5 library provides graphical output capabilities in HDF5/XDMF format. HDF5 should be readily packaged by most Linux distributions. (Don't forget to install a development version of the library). To use a self compiled version, specify -DHDF5_DIR=/path/to/hdf5 on the command line.

METIS

METIS is a library that provides various methods to partition graphs. deal.II uses it in programs like the step-17 tutorial to partition a mesh for parallel computing. To use a self compiled version, specify -DMETIS_DIR=/path/to/metis on the command line. deal.II supports METIS 5 and later.

Note: A more modern way to support parallel computations is shown in the step-40 tutorial program and is based on the p4est library instead of METIS. See below on installing p4est.

muparser

muparser is a library that allows to enter functions in text form and have them interpreted at run time. This is particularly useful in input parameter files. cmake will usually find the version of this library that comes bundled with deal.II, but you can specify -DMUPARSER_DIR=/path/to/muparser if desired.

OpenCASCADE
Open CASCADE Technology is a software development kit for applications dealing with 3D CAD data, freely available in open source. Our internal interface works with the legacy version of OpenCASCADE, which you can download and install from the official website, as well as with the OpenCASCADE Community Edition (OCE, available at https://github.com/tpaviot/oce), which offers a cmake interface for its compilation. Alternatively, you can install one of the many external applications that ship with OpenCASCADE internally (for example SALOME, or FreeCAD). Further installation instructions can be found here.
NetCDF
NetCDF is a library that provides services for reading and writing mesh data (and many other things). deal.II can use it to read meshes via one of the functions of the GridIn class. NetCDF should be readily packaged by most Linux distributions. (Don't forget to install a development version of the library). To use a self compiled version, pass -DNETCDF_DIR=/path/to/netcdf to cmake.
p4est

p4est is a library that deal.II uses to distribute very large meshes across multiple processors (think meshes with a billion cells on 10,000 processors). Using and installing p4est is discussed here. To use a self compiled version, pass the argument -DP4EST_DIR=/path/to/p4est to the cmake command.

PETSc

PETSc is a library that supports parallel linear algebra and many other things. PETSc is already packaged by some Linux distributions and should be found automatically if present. (Don't forget to install a development version of the library). To use a self compiled version of PETSc, add -DPETSC_DIR=/path/to/petsc -DPETSC_ARCH=architecture to the argument list for cmake. The values for these arguments must be the same as those specified when building PETSc.

To disable the PETSc interfaces in cases where cmake automatically finds it, use -DDEAL_II_WITH_PETSC=OFF More information on configuring and building PETSc can be found here.

SLEPc

SLEPc is a library for eigenvalue computations that builds on PETSc. Its configuration works just like that for PETSc, except that the variable to set is SLEPC_DIR. For the interface with SLEPc to work, deal.II's PETSc interface must also be configured correctly (see above).

To disable the SLEPc interfaces in cases where cmake automatically finds it, use -DDEAL_II_WITH_PETSC=OFF More information on configuring and building SLEPc can be found here.

Threading Building Blocks (TBB)

The Threading Building Blocks (TBB) is a library that provides advanced services for using multiple processor cores on a single machine and is used in deal.II to parallelize many operations. If not found in a system-wide location, cmake will resort to the version bundled as part of the deal.II download. It is always enabled unless threads are explicitly disabled, see above.

Trilinos

Trilinos is a library for parallel linear algebra and all sorts of other things as well. To interface with a self compiled version of Trilinos add -DTRILINOS_DIR=/path/to/trilinos to the argument list for cmake. Alternatively, you can also set an environment variable TRILINOS_DIR and cmake will pick up this path.

To disable the Trilinos interfaces in cases where cmake automatically finds it, use -DDEAL_II_WITH_TRILINOS=OFF More details about compatibility and configuration can be found here.

UMFPACK

UMFPACK is a sparse direct solver that we often use in prototype codes where the goal is to simply get a linear system solved robustly. The interface will be enabled by default, either using a version installed on your system of using a version that comes bundled with deal.II. It can be disabled explicitly by using the -DDEAL_II_WITH_UMFPACK=OFF argument. To use a self compiled version, pass the argument -DUMFPACK_DIR=/path/to/umfpack to the cmake command.

UMFPACK has its own license. To use it with deal.II, please read it and make sure that you agree with it. You can find the license of UMFPACK here. We include UMFPACK in the deal.II distributions courtesy of its author, Timothy A. Davis.

More information on configuring and building the library

The deal.II cmake system allows far greater control over what exactly is configured or built than just the outline above. If you want to learn more about this, take a look here. You might also be interested in CMake for user projects or build system internals.

License

The deal.II library is free software; you can use it, redistribute it, and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This allows you to use the library free of charge for private, academic, or commercial use (under the terms of the LGPL v2.1 or later). You are guaranteed full access to the source code and are encouraged to help in the further development of the library. Follow this link for detailed information.

Please note:


Valid HTML 4.01! Valid CSS!