Installation instructions and further information on deal.II

This document contains the following sections:

System requirements

Supported platforms

At present, deal.II has been developed and tested on the following platforms: Newer versions of the compilers listed above are also likely to work, as are other brands of Unix (for example Sun Solaris, FreeBSD, or Linux on chips like SPARC, PA-RISC, PowerPC, etc) using gcc as compiler, but we do not regularly test them.

Unsupported / partly supported platforms

For the following list of systems, we have collected our experiences on separate pages:

deal.II uses only very few features of an operating system. It should therefore be rather simple to port it to other systems, at least with the compilers stated above. If your system is not on this list, take a look at the page that describes porting the library to new systems.

Additional software requirements

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

Installation

Unpacking

The whole library usually comes as a .tar.gz file, that is a tarred file archive which is compressed with gzip. After downloading this tar file, please unpack it at the position where you want to install the deal.II library 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 xzf deal.II-X.Y.Z.tar.gz
    
Unpacking will create a subdirectory deal.II with the whole library wherever you do it. Since deal.II does not have a make install which would copy the libraries to a final position, this subdirectory is where the built library will reside.

Configuration

Unpacking will create a subdirectory deal.II. First run

      cd deal.II
      ./configure
    
to set some paths and find out your system parameters. configure supports several flags which are discussed further down below.

./configure creates the file deal.II/common/Make.global_options, which remembers paths and configuration options. Please note that it is not possible to move the library directory after configuration. Neither will the library compile, nor will your application programs be able to use it. You can use deal.II/common/Make.global_options in the Makefiles of your own projects to set relevant paths and parameters correctly.

Building the library

After configuring, type make, to obtain the following help (this output may change slightly over time, just try it):
    ========================================================================
    =              Global Makefile for the deal.II libraries               =
    ========================================================================
    =                                                                      =
    = The following targets exist:                                         =
    =    all        : debug and optimized libraries                        =
    =    debug      : the debug version of the deal.II library             =
    =    optimized  : the optimized version of the deal.II library         =
    =                                                                      =
    =    contrib    : additional libraries in contrib, if there are any    =
    =                                                                      =
    =    online-doc : generate the documentation in HTML format            =
    =    TODO       : create a "TODO" file from the source files           =
    =    TAGS       : create a TAGS file from include and source files     =
    =                                                                      =
    =    clean      : removes all object files in subdirs                  =
    =    distclean  : removes all object files, libraries, etc in subdirs  =
    ========================================================================
    

To execute one of the commands, type for example make all. Building all libraries takes somewhere between 4 minutes and several hours, depending on the number of processors your machine has, and requires about 2 GB of free disk space. If you have a multi-processor machine, you can call make -j16 target-name to let make call multiple instances of the compiler (in this case sixteen). This speeds up compilation by about the factor given after -j, at least if you have as many processors.

The deal.II libraries come in two versions corresponding to their respective targets:

Each library file will have a suffix that depends on the system. If static libraries were requested during configuration, then the suffix is .a. For shared libraries, it is .so (for most Unix-like and Linux systems), .dylib (for Mac OS X), or .dll (for Cygwin/Windows).

Apart from the libraries, you can generate the full set of documentation files, by typing make online-doc; this takes some minutes but you will have (almost) all the documentation locally on your computer. You will then be able to access it through this page.

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.

Configuration options

Changing the compiler or compiler flags

To instruct configure to use a particular compiler, there are two options: first, you can prepend your search path by the directory of the desired compiler. Alternatively, if your full compiler paths are mycc and myc++ (for example) for your C and C++ compilers, respectively, type into your csh:
      setenv CC  mycc
      setenv CXX myc++
      ./configure
    
or into your bash
      export CC=mycc
      export CXX=myc++
      ./configure
    

The paths to these compilers are stored in the common/Make.global_options files, so the compilers are always used when compiling the library even if the environment variables are not set later on any more (for example if you are working within another window, or have unset the variables for other purposes).

If all you want to do is pass different compiler flags to the compiler, set the standard environment variables CXXFLAGS, CFLAGS, LDFLAGS before calling ./configure. For example, to produce gprof output, do:

      setenv CXXFLAGS -pg
      setenv LDFLAGS -pg
      ./configure <configure-options>
    
The flags so set are used for both optimized and debug mode. If you want to set flags for only one of these two cases, you should set CXXFLAGSO or CXXFLAGSG, respectively.

Selecting optional behavior

You can give several flags to ./configure:

./configure stores the paths to some programs, such as the compilers or the Perl interpreter. The compiler which will be used when compiling the library (or your own application) is therefore selected at the time of configuration and independent of the setting of your $PATH environment value at the time when you run make. If you want to change the compiler used, you will therefore have to re-run ./configure.

It is in general a good idea to run make clean before re-configuring.

Optional interfaces to other software packages

deal.II comes with built-in support for a number of external software packages. These packages are sometimes detected automatically, sometimes they must be enabled explicitly during configuration by adding the option --with-package. Supported software packages are (the following list contains trademarks belonging to their owners):

TECPLOT
Autodetected if one of the variables $TECHOME, $TEC80HOME or $TEC90HOME points to a valid installation of the tecio library. If enabled, allows data output in TECPLOT format.
UMFPACK
Enabled by --with-umfpack. If no argument is given, use the version of UMFPACK that comes bundled with deal.II. If you want a different version of UMFPACK, provide the path to that version as an argument. Enabling UMFPACK adds the class SparseDirectUMFPACK to the library. The default is to not use UMFPACK.

If you want to use an external installation of UMFPACK, but UMFPACK was installed as part of /usr or /opt, instead of local directories in a home directory for example, you can use configure switches --with-umfpack-include, --with-umfpack-libs.

Note that UMFPACK has its own license; if you want 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.

Petsc

deal.II can interface to the PETSc library. The simplest way to do so is to set the PETSC_DIR and PETSC_ARCH environment variables. More information and configuration options can be found by issuing ./configure --help at the command line, or, here.

Slepc

deal.II can also interface to the SLEPc library. The way to do it is to set the SLEPC_DIR environment variable by passing --with-slepc=/path/to/slepc to deal.II's ./configure script. The use of SLEPc is optional, however, for the interface with SLEPc to work at all, deal.II's interface to PETSc must also be configured correctly (see the notes above on how to do this).

Trilinos

deal.II can also interface to Trilinos. The simplest way to use these interfaces is to pass --with-trilinos=/path/to/trilinos to deal.II's ./configure script. More configuration options can be found here.

Metis

In order to generate partitionings of triangulations, we have functions that call METIS library. METIS is a library that provides various methods to partition graphs, which we use to define which cell belongs to which part of a triangulation. The main point in using METIS is to generate partitions so that the interfaces between cell blocks are as small as possible. This data can, in turn, be used to distribute degrees of freedom onto different processors when using PETSc and/or SLEPc in parallel mode.

As with PETSc and SLEPc, the use of METIS is optional. If you wish to use it, you can do so by having a METIS installation around at the time of calling ./configure by either setting the METIS_DIR environment variable denoting the path to the METIS library, or using the --with-metis flag. If METIS was installed as part of /usr or /opt, instead of local directories in a home directory for example, you can use configure switches --with-metis-include, --with-metis-libs.

On some systems, when using shared libraries for deal.II, you may get warnings of the kind libmetis.a(pmetis.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC when linking. This can be avoided by recompiling METIS with -fPIC as a compiler flag.

METIS is not needed when using p4est to parallelize programs, see below.

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 configure deal.II with p4est, you will need to use the --with-path=/path/to/path switch to the ./configure script.

BLAS, LAPACK

If --with-blas=blasname and/or --with-lapack=lapackname is given, provide wrappers around some of the BLAS and LAPACK functions, and link with the respective libraries. It will make sure that we link with the required FORTRAN libraries. If no argument is given to --with-blas, then a BLAS library libblas.a or libblas.so is searched for in the default locations of your system, and similarly for LAPACK.

If your BLAS or LAPACK libraries are not in the standard search path of your linker, you have to tell the linker where to find them. The path is not given as an argument to --with-blas. Rather, you set the variable LDFLAGS accordingly or make sure that the path is in your LD_LIBRARY_PATH or similar. For details, please look up the documentation of your linker. An example configuration for Linux is:

    ./configure --with-blas=myblas LDFLAGS=-L/my/lib/
    

This example will search for a library libmyblas.a or libmyblas.so in the directory /my/lib and elsewhere in the system library paths.

Some versions of BLAS and LAPACK need additional libraries to be linked with. Such an example is the automatically tuned linear algebra software (ATLAS). The BLAS version of this package also needs declarations from libatlas.a, so it must be included. Using the standard library names of atlas, the include for BLAS reads

    ./configure --with-blas='f77blas -latlas'
    
assuming that the library files libf77blas.a and libatlas.a or the respective shared libraries *.so are in libraries included in LD_LIBRARY_PATH. LAPACK generated by ATLAS is included in a similar fashion.

NetCDF
Autodetected if the NETCDF_DIR environment variable points to a valid installation of the NetCDF library. Can also be enabled by --with-netcdf=/path/to/netcdf which overrides the path in $NETCDF_DIR. If enabled, deal.II allows grid input in NetCDF format (GridIn::read_netcdf). If NetCDF was installed as part of /usr or /opt, instead of local directories in a home directory for example, you can use configure switches --with-netcdf-include, --with-netcdf-libs.
Harwell Subroutine Library (HSL)
It is possible to use some subroutines from the Harwell Subroutine Library (HSL) to make use of some sparse direct solvers. For a description of how to include these functions, see this page.
MUltifrontal Massively Parallel sparse direct Solver (MUMPS)
It is possible to make use some subroutines that make use of the MUltifrontal Massively Parallel sparse direct Solver (MUMPS). For a detailed description of how to compile MUMPS (and some dependencies) and linking with deal.II, see this page.
FunctionParser
There is a wrapper for the FunctionParser library, which has its own license; if you want to use it with deal.II, please read it and make sure that you agree with it. You can find the license of FunctionParser here. We include FunctionParser in the deal.II distributions courtesy of its author, Juha Nieminen.
ARPACK
There is a wrapper for the eigenvalue solver ARPACK library, which has its own license; if you want to use it with deal.II, please read it and make sure that you agree with it. You can find the license of ARPACK here. For a detailed description of how to compile ARPACK and linking with deal.II, see this page.

Problems, questions, mailing lists

Some information beyond what is covered in the documentation of the library may be found on the homepage of deal.II, or in the Frequently Asked Questions section. If you don't find what you're looking for, feel free to ask on our Mailing list.

For specific problems, send email to either Wolfgang.Bangerth, Guido.Kanschat, or simply authors at dealii.org.

We are interested in any feedback, whether positive or negative, in order to determine the directions of future work on the library. We are also very much interested in incorporating any work and bug fixes by third parties into the library. Of course, you will be credited for this on our home page.

Our institutes are evaluated at regular intervals. Consequently, we are interested in documenting the use of the programs and libraries we create. To this end, we collect publications with results obtained using deal.II. Please let us know if you have publications that we can add to this page.

License

We have placed deal.II under an Open Source license, which allows you to use the library free of charge. You are guaranteed full access to the source code and are encouraged to help in the further development of the library. Follow this link to read the full text of the license,

The basics of the license are in short:

deal.II can interface with a number of other packages that you have to install yourself. They are, of course, covered by their own licenses. In addition, deal.II comes with copies of UMFPACK and FunctionParser, courtesy of their authors. UMFPACK and FunctionParser are covered by their own licenses; please refer to their webpages to read them.


The deal.II mailing list $Date: 2011-08-30 11:30:56 -0500 (Tue, 30 Aug 2011) $